Skip to content

Error: Cannot find module 'core-js/shim' from 'index.js' #1014

Closed
@TylerYang

Description

Hi folks, I was trying to setup the jest for my project.
When I try to run npm test I got the error message below,

 [32] → npm test

> jest-demo@1.0.0 test /Users/tyler/Desktop/test/jest-demo
> jest

Using Jest CLI v12.0.2, jasmine2, babel-jest
 FAIL  src/Button/__tests__/Button-test.js
● Runtime Error
Error: Cannot find module 'core-js/shim' from 'index.js'
    at Runtime._resolveNodeModule (/Users/tyler/Desktop/test/jest-demo/node_modules/jest-cli/src/Runtime/Runtime.js:451:11)
    at Object.<anonymous> (/Users/tyler/Desktop/test/jest-demo/node_modules/babel-polyfill/lib/index.js:3:25)
npm ERR! Test failed.  See above for more details.

Then I open my node_modules, and core-js/shim.js does exist.
Could anybody take a glance at this runable example here. ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions