question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, great library! Unfortunately npm test is failing for me, running on Mac OS X High Sierra.

I’ve tried removing node_modules and doing an npm install. No dice. Looks like the path is wrong in package.json.

FAIL  src/App.test.js
  ● Test suite failed to run

    ENOENT: no such file or directory, stat '/Users/john/dev/drizzle/\config\polyfills.js'
        at Error (native)
      
      at Object.fs.statSync (fs.js:981:18)
      at Object.statSync (node_modules/graceful-fs/polyfills.js:297:22)

Test Suites: 1 failed, 1 total

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
pemuliscommented, Mar 1, 2018

Here’s what I changed in package.json to get the test to pass:

Line 76 "<rootDir>/config/polyfills.js"

Lines 85-86 "^.+/.css$": "<rootDir>/config/jest/cssTransform.js",

"^(?!.*/.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"

I was still getting a “Cannot find module” error until I added <rootDir> to those lines.

0reactions
stale[bot]commented, Apr 2, 2019

This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM ERR! Test failed - Not able to run test - Stack Overflow
NPM ERR ! Test failed and worker process has quit unexpectedly! Most likely this is an initialization error. Here is part of the...
Read more >
Npm build and npm test fail with TypeError and or multiple errors
Both npm run build and npm run test fail with a TypeError or multiple other errors in my local vanilla clone of the...
Read more >
console-fail-test - npm
Gently fails test runs if the console was used during them. ... Start using console-fail-test in your project by running `npm i ...
Read more >
Jest fails as part of npm build - Visual Studio Feedback
I have an npm project that uses jest to run unit tests. I have a cloud build definition that runs a sequence of...
Read more >
Failed: npm test -t db-connection - M220JS - MongoDB
Determining test suites to run…Setup Mongo Connection FAIL test/db-connection.test.js ○ Test suite failed to run
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found