Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Error in module.js and NPM is broken after the recursive update (Cannot find module 'process-nextick-args') #16007

Closed
1 of 13 tasks
pubmikeb opened this issue Mar 11, 2017 · 2 comments

Comments

@pubmikeb
Copy link

pubmikeb commented Mar 11, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

I made fresh install of Node.js and now want completely to update all Node.js's modules.
To do so I follow the following manual:
http://stackoverflow.com/a/34295664/462347

The entire recursive update completes correctly, no error is returned.
The problem happens right after the execution of npm --depth 9999 update --dev --save,
at the last step: npm cache clear.

NPM returns the following error:

module.js:472
    throw err;
    ^

Error: Cannot find module 'process-nextick-args'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\readable-stream\lib\_stream_readable.js:6:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
module.js:472
    throw err;
    ^

Error: Cannot find module 'process-nextick-args'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\readable-stream\lib\_stream_readable.js:6:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

The same error happens when I try to check the NPM's version: npm -v.

How can the CLI team reproduce the problem?

Follow step-by-step the manual:
http://stackoverflow.com/a/34295664/462347

supporting information:

  • npm -v prints: 4.4.1
  • node -v prints: 7.7.2
  • npm config get registry prints:
module.js:472
    throw err;
    ^

Error: Cannot find module 'process-nextick-args'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\readable-stream\lib\_stream_readable.js:6:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
module.js:472
    throw err;
    ^

Error: Cannot find module 'process-nextick-args'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npmlog\node_modules\readable-stream\lib\_stream_readable.js:6:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
  • Windows, OS X/macOS, or Linux?: Windows 10.1607.14393.726
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@pubmikeb pubmikeb changed the title Error in module.js and NPM is broken after the recursive update Error in module.js and NPM is broken after the recursive update (Cannot find module 'process-nextick-args') Mar 11, 2017
@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

@pubmikeb
Copy link
Author

I checked the case on NPM 5.0.3 and Node.js 8.1.2 and after first execution of npm --depth 9999 update --dev, which has been finished successfully I tried to execute npm -v and got the following error:

C:\Program Files\nodejs\node_modules\npm>npm -v
module.js:487
    throw err;
    ^

Error: Cannot find module 'core-util-is'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib\_stream_readable.js:36:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
module.js:487
    throw err;
    ^

Error: Cannot find module 'core-util-is'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\readable-stream\lib\_stream_readable.js:36:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants