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.

Error while running under npm v6.11 in Windows

See original GitHub issue

Issue repository

https://github.com/swayams/geektrust-solutions

Expected Behavior

I have setup nyc + babel following https://istanbul.js.org/docs/tutorials/es2015/ when I run test task it should show me passed tests alogn with coverage. If i remove nyc from task command ( ie just run mocha, it works fine )

Actual Behavior

When I use nyc along with mocha and babel, I get error that node module is not found. I have cleaned and reinstalled. Issue persists. Please refer below for error details.

System Information

System: OS: Windows 10 CPU: (8) x64 Intel® Core™ i7-7820HQ CPU @ 2.90GHz Memory: 7.78 GB / 15.88 GB Binaries: Node: 8.12.0 - C:\Program Files\nodejs\node.EXE npm: 6.11.1 - C:\Program Files\nodejs\npm.CMD npmPackages: @babel/cli: ^7.5.5 => 7.5.5 @babel/core: ^7.5.5 => 7.5.5 @babel/node: ^7.5.5 => 7.5.5 @babel/plugin-proposal-class-properties: ^7.5.5 => 7.5.5 @babel/preset-env: ^7.5.5 => 7.5.5 @babel/register: ^7.5.5 => 7.5.5 babel-node: 0.0.1-security => 0.0.1-security babel-plugin-istanbul: ^5.2.0 => 5.2.0 nyc: ^14.1.1 => 14.1.1

Output

 module.js:550
    throw err;
    ^

Error: Cannot find module 'C:\Users\siddhswa\study\geektrust-solutions\Geektrust-problem-1\node'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3


``` module.js:550
    throw err;
    ^

Error: Cannot find module 'C:\Users\siddhswa\study\geektrust-solutions\Geektrust-problem-1\node'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3`



Issue Analytics

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

github_iconTop GitHub Comments

1reaction
coreyfarrellcommented, Aug 26, 2019

Appears there is a bug in current versions of npm which prevents --depth 9999 from being honored, so it’s failing to update spawn-wrap. My advice for now is to run npm i spawn-wrap@1.4.3, then remove the spawn-wrap dependency from your package.json. This will update the installed copy in node_modules and update your package-lock.json.

1reaction
coreyfarrellcommented, Aug 23, 2019

Please run npm update --depth 9999 to update your package-lock.json then try again. An updated version of spawn-wrap was just released which should resolve this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing node.js v6.11.2 does not install proper npm version ...
I'm finding that when I attempt to install node.js v6.11.2 on my Windows 7 machine, it is installing the wrong version of npm...
Read more >
Common errors | npm Docs
Windows: If you're on Windows and you have a broken installation, the easiest thing to ... Running a Vagrant box on Windows fails...
Read more >
n - npm
Simply execute n <version> to download and install a version of Node.js. If <version> has already been downloaded, n will install from its...
Read more >
node-sass - npm
Start using node-sass in your project by running `npm i node-sass`. There are 12489 other projects in the npm registry using node-sass.
Read more >
sqlite3 - npm
Start using sqlite3 in your project by running `npm i sqlite3`. ... These binaries are hosted on GitHub Releases for sqlite3 versions above ......
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