Angular-cli: ng new not working!!

Created on 11 Oct 2016  路  14Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Ubuntu 14.06 LTS

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
ng --version gives error
node --version v6.7.0

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Tried to create new project.
ng new Test
Cannot find module 'process-nextick-args'
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/node_modules/readable-stream/lib/_stream_readable.js:6:23)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/node_modules/readable-stream/readable.js:6:28)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/node_modules/memory-fs/lib/MemoryFileSystem.js:8:14)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/node_modules/webpack-dev-middleware/middleware.js:5:24)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/node_modules/webpack-dev-server/lib/Server.js:3:28)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/tasks/serve-webpack.js:8:24)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/angular-cli/commands/serve.js:7:23)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Class.includedCommands (/usr/local/lib/node_modules/angular-cli/addon/index.js:22:16)
at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/models/project.js:392:61
at Array.forEach (native)
at Project.addonCommands (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/models/project.js:391:15)
at Project.eachAddonCommand (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/models/project.js:426:30)
at module.exports (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/cli/lookup-command.js:33:13)
at CLI. (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/cli/cli.js:34:26)
at tryCatch (/usr/local/lib/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
at invokeCallback (/usr/local/lib/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
at publish (/usr/local/lib/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7)
at flush (/usr/local/lib/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/asap.js:85:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.

removed the angular-cli once the reinstalled. Now getting this. gave probably the same error in the previous also not working installation.


Thanks! We'll be in touch soon.

Most helpful comment

@Reozil I solve it.
just we need to install it globally
npm install -g process-nextick-args

After that try to run again
ng new testProject

馃帀 Cheers !馃帀

All 14 comments

@Reozil -- if ng --version "gives error", then something went wrong with your Angular CLI installation, in which case ng new is unlikely to work...so, first figure out what went wrong with your installation.

@Reozil what's your npm version? Please update to the latest version

+1 Same problem on Windows 10

I'm getting the same error on ng --version or ng new testProject

@Reozil I solve it.
just we need to install it globally
npm install -g process-nextick-args

After that try to run again
ng new testProject

馃帀 Cheers !馃帀

Still also getting
Error: Cannot find module 'process-nextick-args'
any time i use ng
even after npm install -g --save process-nextick-args
nodejs: v6.8.1
npm: v6.8.1

OS: ubuntu 16.04
and i have tried this with both angular-cli and angular-cli@latest, this is very frustrating it seems the hardest part about anguarl2 is getting angular-cli to work

@Disk1of5
Please try without --save, it's my mistake
npm install -g process-nextick-args

I have an issue after installing angular-cli globally on my machine. I typed ng new (project name) to create a new project, but it gives error in the end.
Please see blow screens.

capture1
capture2
capture3

Same Problem as above

Hey Delete package.json file from main directory and run agin "ng new my-app"

Same problem as above.

Here is the ng version

Angular CLI: 6.0.8
Node: 9.11.1
OS: win32 x64
Angular:
...

  Package                      Version
  ------------------------------------------------------ 
 @angular-devkit/architect    0.6.8 
 @angular-devkit/core         0.6.8
 @angular-devkit/schematics   0.6.8
 @schematics/angular          0.6.8
 @schematics/update           0.6.8
  rxjs                         6.2.1
 typescript              2.7.2**

I am writing the code ng new recipe-book --prefix rb but got the same error. Package failed
ng

Hey ankitpinl,

did you got any work round for your issue.
I am also facing the same one.

ng version

Angular CLI: 6.0.8
Node: 8.11.3
OS: win32 x64
Angular:
...

Package Version

@angular-devkit/architect 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.1
typescript 2.7.2

Hey, pritammore

I have uninstalled CLI 6.0.8 and installed 6.0.0 CLI and run the command ng new and it is working perfectly.

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._

Was this page helpful?
0 / 5 - 0 ratings