Repository navigation
Error: Cannot find module 'process-nextick-args' #1930
Copy link
Copy link
Closed
Labels
Description
Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 10 - Versions. Please run
ng --version. If there's nothing outputted, please run
in a Terminal:node --versionand paste the result here:
I cannot even get this (same error). But installed1.0.0-beta.11-webpack.8 - Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc. - The log given by the failure. Normally this include a stack trace and some
more information.
Error while running script "C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\addon\ng2\tasks\serve-webpack.ts":
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\readable-stream\lib\_stream_readable.js:6:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\readable-stream\readable.js:6:28)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
Error while running script "C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\addon\ng2\commands\serve.ts":
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\readable-stream\lib\_stream_readable.js:6:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\readable-stream\readable.js:6:28)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
Cannot find module 'process-nextick-args'
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\readable-stream\lib\_stream_readable.js:6:23)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\readable-stream\readable.js:6:28)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module._load (C:\work\PST\workspace\PST\pst-app-client\cli2\node_modules\angular-cli\lib\bootstrap-local.js:55:22)
at Module.require (module.js:468:17)
- Mention any other details that might be useful.
Tried to init a project (ng init).
Installed locally in the project's directory (npm i angular-cli@webpack)
Thanks! We'll be in touch soon.
Reactions are currently unavailable
Activity
filipesilva commentedon Sep 9, 2016
node@5.12.0,npm@3.8.6, win10.Tried making a custom version and installing globally from it.
I can verify that adding
process-nextick-args util-deprecateto the depedencies fixes this issue, but can't help but think this a symptom of another problem. Will investigate more.Edit:
Can also verify that it doesn't have anything to do with our
devDependencies, as I copied them over intodependenciesand got the same error.On a fresh copy of the repo,
npm installseems to fail initially with anode-sassrelated problem, but a secondnpm installworks fine.npm linkafter that doesn't give any errors onng version. This might be related with some custom logic we have for npm linked setups.filipesilva commentedon Sep 10, 2016
I've been trying to get to the root of this issue without much success. As far as I can tell, this is either a node or a nvm problem somehow. Maybe an odd combination of packages, or some kind of odd interaction with packages that try to be built like
node-sass.I've tried a lot of installs so far, and the best way I've found to reproduce this in Windows:
nvm install 5.12.0(if you have it already, uninstall and reinstall)nvm use 5.12.0npm install -g angular-cli@1.0.0-beta.11-webpack.8ng versionThis gets me the error shown in the initial report:
As reported by @kevinsawicki, this also seems to happen in other projects: electron-userland/electron-prebuilt#63 (comment)
As reported by @rbj325, using
node@6.5.0seems to work. This is best user solution I've found so far.I'm not sure what can be done on our side to support node 5... we could add
process-nextick-args util-deprecateas dependencies, but we don't even use them directly./cc @hansl
filipesilva commentedon Sep 12, 2016
Removing the critical label as it only seems to affect a subset of users and, as far as I can tell, it's not within out control to fix it.
SparK-Cruz commentedon Sep 14, 2016
I'm on linux, node 6.2.0 (via distro's package manager), same error. Installing both dependencies as global packages fixed for me.
# npm install -g angular-cli@webpack... warnings, native builds failing, messedup makefiles...$ ng initerror#arrumaIssoFilipe
krishollenbeck commentedon Sep 14, 2016
I am also getting this error after attempting to update from
"angular-cli": "1.0.0-beta.11-webpack", to"angular-cli": "1.0.0-beta.11-webpack.3".Windows 7
Node 6.2.1
NPM 3.9.3
byteofsilicon commentedon Sep 19, 2016
I am receiving this error as well. I installed the latest version of the CLI globablly:
npm uninstall -g angular-clinpm cache cleannpm install -g angular-cli@latestthen created new angular2 project using the
ng new projectcommand to create a new project then executing theng servecommand.Operating System: Windows 7
Angular CLI version: 1.0.0-beta.14
Node version: 6.5.0
NPM version: 3.9.2
web-dave commentedon Sep 21, 2016
Still exists at beta 15.
angular-cli: 1.0.0-beta.15
node: 4.5.0
os: win32 ia32
npm i process-nextick-args util-deprecatefixed it.sryzycki commentedon Sep 26, 2016
I can confirm that
ngcommand works for this setup as listed below (after upgrading Node):angular-cli: 1.0.0-beta.15
node: 6.6.0
os: darwin x64
filipesilva commentedon Dec 22, 2016
I think this was completely fixed in #3414. My theory is that, on machines that could build
node-zopfli, it could fail and leave you with an incomplete install.Closing but please let me know if it still happens.
ultramarichka commentedon Oct 30, 2017
nvm install 6.11.3
helped me to install that damn package
alperdemirci commentedon Nov 1, 2017
I ran into this issue and after spending sometime, I decided to delete node and npm.
To completely uninstall node + npm is to do the following:
I find all this from this link https://stackoverflow.com/a/11178106
And if you don't know how to reinstall Node and npm, follow this: http://blog.teamtreehouse.com/install-node-js-npm-mac
I hope this will help everyone
sushilcmd commentedon Feb 5, 2018
I think this issue occur because of node version .So update your node and npm version.
I had same issue on Ubuntu then i updated my node and npm version and install angular CLI :)
Check node version
nodejs --version
Update node version
sudo apt-get install nodejs
Update npm version
sudo apt-get install npm
Install angular CLI
npm install -g @angular/cli
thinkspill commentedon Feb 12, 2018
Seeing this error directly after
npm i -g npm. Now evennpm -vreturns the process-nextick-args not found errror.Node/npm originally installed via nodesource.com.
trainoasis commentedon Mar 20, 2018
Same problem as @thinkspill.
npm -vthrows the error already. Can't use any of the solutions above, since each time the same error pops up. Any ideas perhaps? 😞bungmomomm commentedon Mar 29, 2018
In my case it happens when i install yarn and seems there are conflict happens in there
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.