cli icon indicating copy to clipboard operation
cli copied to clipboard

Ng new project isn't working

Open ANadjia opened this issue 6 years ago • 45 comments

i am trying to create a new angular project , it's not working and having this output : i have node v : v13.13.0 angular v : Angular CLI: 9.1.2 npm v : '6.14.4'

\ Installing packages...npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements. npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm ERR! Unexpected end of JSON input while parsing near '...},"4.2.1":{"name":"@a'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2020-04-22T08_41_24_031Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.

ANadjia avatar Apr 22 '20 08:04 ANadjia

Having the same error here: CREATE goty/e2e/src/app.po.ts (301 bytes) \ Installing packages...npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at: npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Andres\AppData\Roaming\npm-cache_logs\2020-04-22T20_44_15_910Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.

And the log states as following in the last lines:

1726 http fetch GET 200 https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz 45ms 1727 silly pacote range manifest for p-locate@^3.0.0 fetched in 10221ms 1728 silly pacote range manifest for p-limit@^2.0.0 fetched in 2ms 1729 timing npm Completed in 183765ms 1730 error cb() never called! 1731 error This is an error with npm itself. Please report this error at: 1732 error https://npm.community

felo13 avatar Apr 22 '20 20:04 felo13

install latest angular cli by: npm install -g @angular/cli@latest

padmesh97 avatar Apr 23 '20 17:04 padmesh97

Hi all, Same issue with 9.1.3

haikalalselwi avatar Apr 24 '20 01:04 haikalalselwi

same issue.. can anyone pls suggest solution?

vijay-flexiloans avatar Apr 24 '20 10:04 vijay-flexiloans

same problem when creating new angular project .. node -v : v12.16.2 npm -v : 6.14.4 Angular CLI: 9.1.3 i have tried everything that i found in the internet , but nothing worked ,, what can i do ?!!

zaky2016 avatar Apr 24 '20 14:04 zaky2016

Hii.. I worked around it (after lots of debugging), guess the problem is with npm cli.

I uninstalled the latest node and npm versions, and went back to node v12.4.0 and npm 6.9.0

For now everything works! (using angular/cli 9.1.3)

try it.

vijay-flexiloans avatar Apr 24 '20 15:04 vijay-flexiloans

https://github.com/npm/cli/issues/1191#issuecomment-619064170 vijay-flexiloans .. this worked for me , thanks

zaky2016 avatar Apr 24 '20 16:04 zaky2016

how can I get node v12.4.0 and npm 6.9.0 ? Because I am facing the same error

ANJANASREE avatar Apr 25 '20 18:04 ANJANASREE

https://tecadmin.net/upgrade-nodejs-via-npm/

i change sudo n stable to: sudo n 12.4.0 after that: node -v => 12.4.0 npm -v => 6.9.0

those worked for me

er1kw avatar Apr 25 '20 18:04 er1kw

npm install -g @angular/cli npm install mkdirp npm cache verify

close the terminal and open it again ng new newApp

it will work for this issue......

sageetheba avatar Apr 26 '20 21:04 sageetheba

how can I get node v12.4.0 and npm 6.9.0 ? Because I am facing the same error

npm install -g @angular/cli npm install mkdirp npm cache verify

close the terminal and open it again ng new newApp

it will work for this issue......

sageetheba avatar Apr 26 '20 21:04 sageetheba

i am trying to create a new angular project , it's not working and having this output : i have node v : v13.13.0 angular v : Angular CLI: 9.1.2 npm v : '6.14.4'

\ Installing packages...npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information. npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142 npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements. npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm ERR! Unexpected end of JSON input while parsing near '...},"4.2.1":{"name":"@A'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2020-04-22T08_41_24_031Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.

npm install -g @angular/cli npm install mkdirp npm cache verify

close the terminal and open it again ng new newApp

it will work for this issue...... try it

sageetheba avatar Apr 26 '20 21:04 sageetheba

npm install -g @angular/cli npm install mkdirp npm cache verify

close the terminal and open it again ng new newApp

it will work for this issue...... try it

This does not fix the issue. There is no change after running these steps

Edit: my issue is slightly different but gives the same error message of "schematic workflow failed"

My issue seems to be a permissions error un-linking from the .staging directory.

npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path c:\src\play\monorepo\node_modules\.staging\@angular\core-94532156\fesm2015\core.js.map
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'c:\src\play\monorepo\node_modules\.staging\@angular\core-94532156\fesm2015\core.js.map'
npm ERR!  [OperationalError: EPERM: operation not permitted, unlink 'c:\src\play\monorepo\node_modules\.staging\@angular\core-94532156\fesm2015\core.js.map'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, unlink 'c:\src\play\monorepo\node_modules\.staging\@angular\core-94532156\fesm2015\core.js.map'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'unlink',
npm ERR!     path: 'c:\\src\\play\\monorepo\\node_modules\\.staging\\@angular\\core-94532156\\fesm2015\\core.js.map'
npm ERR!   },
npm ERR!   stack: "Error: EPERM: operation not permitted, unlink 'c:\\src\\play\\monorepo\\node_modules\\.staging\\@angular\\core-94532156\\fesm2015\\core.js.map'",
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'c:\\src\\play\\monorepo\\node_modules\\.staging\\@angular\\core-94532156\\fesm2015\\core.js.map',
npm ERR!   parent: 'monorepo'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\john.stillwell\AppData\Roaming\npm-cache\_logs\2020-05-04T14_36_04_180Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.

jstillwell avatar May 04 '20 16:05 jstillwell

how can I get node v12.4.0 and npm 6.9.0 ? Because I am facing the same error

npm install -g @angular/cli npm install mkdirp npm cache verify

close the terminal and open it again ng new newApp

it will work for this issue......

not working

shva9959 avatar May 11 '20 15:05 shva9959

Installing packages...npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\rollup\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})

npm ERR! Unexpected end of JSON input while parsing near '...hj3+GWoYF1z+Vc+WQ1hiz'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\sony\AppData\Roaming\npm-cache_logs\2020-05-11T14_57_02_945Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above suggest me anyone

shva9959 avatar May 11 '20 15:05 shva9959

I had the exact same error and was able to fix it through following steps.

  1. Run npm cache clean --force
  2. Manually delete npm and npm-cache folders from AppData/Roaming folder (Win + R, Type %AppData% and enter)
  3. Run Node Installer and repair
  4. Reinstall npm install -g @angular/cli
  5. Rerun ng new newApp Worked :)

Vipmat avatar May 12 '20 09:05 Vipmat

didnt worked for me @vipmat

Nikhilbansal777 avatar May 12 '20 17:05 Nikhilbansal777

didnt worked for me also

shva9959 avatar May 12 '20 17:05 shva9959

None of the above worked at all.

flyingabhijeet avatar May 12 '20 19:05 flyingabhijeet

None of the above solutions worked

saumyabhatnagar1 avatar May 15 '20 19:05 saumyabhatnagar1