Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ng new project isn't working #1191

Closed
ANadjia opened this issue Apr 22, 2020 · 45 comments
Closed

Ng new project isn't working #1191

ANadjia opened this issue Apr 22, 2020 · 45 comments
Labels
Release 6.x work is associated with a specific npm 6 release

Comments

@ANadjia
Copy link

ANadjia commented Apr 22, 2020

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 tslint@6.1.1: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.12: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: 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.

@felo13
Copy link

felo13 commented Apr 22, 2020

Having the same error here:
CREATE goty/e2e/src/app.po.ts (301 bytes)
\ Installing packages...npm WARN deprecated tslint@6.1.1: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#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

@padmesh97
Copy link

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

@haikalalselwi
Copy link

Hi all,
Same issue with 9.1.3

@vijay-flexiloans
Copy link

same issue.. can anyone pls suggest solution?

@zaky2016
Copy link

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 ?!!

@vijay-flexiloans
Copy link

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.

@zaky2016
Copy link

#1191 (comment)
vijay-flexiloans .. this worked for me , thanks

@ANJANASREE
Copy link

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

@er1kw
Copy link

er1kw commented Apr 25, 2020

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

@sageetheba
Copy link

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
Copy link

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
Copy link

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 tslint@6.1.1: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.12: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: 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

@jstillwell
Copy link

jstillwell commented May 4, 2020

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.

@shva9959
Copy link

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
Copy link

Installing packages...npm WARN deprecated tslint@6.1.2: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: 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 fsevents@2.1.3: 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 fsevents@1.2.13: 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 fsevents@1.2.13: 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

@Vipmat
Copy link

Vipmat commented May 12, 2020

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 :)

@Nikhilbansal777
Copy link

didnt worked for me @Vipmat

@shva9959
Copy link

didnt worked for me also

@flyingabhijeet
Copy link

None of the above worked at all.

@saumyabhatnagar1
Copy link

None of the above solutions worked

@lalit-whitewolf
Copy link

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 :)

Use node V12.4.0 and npm V6.9.0

@shiva-github
Copy link

I had been facing the same issue.
Try with following steps:

  1. clear your npm cache.
  2. reinstall Angular CLI
  3. create a new app

Commands:
npm cache clean --force
npm install -g @angular/cli@latest
ng new appname

This is working for me.

@tahaabu
Copy link

tahaabu commented Jun 2, 2020

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 :)

This worked for me , with Node v12.16.1 and NPM 6.13.4
Try to close the CMD window for (no particular reason) after step 4.

@rochisha0
Copy link

Tried to do everything suggested still could not get the result. Is this issue in Windows machine only.

@d4ngeraman
Copy link

Tried to do everything suggested still could not get the result. Is this issue in Windows machine only.

no macOS also has same issue

@RashiSrivastava-gitHub
Copy link

npm install mkdirp

not working

@d4ngeraman
Copy link

my issue solved after i update Node and NPM to latest version

@david788
Copy link

I had been facing the same issue.
Try with following steps:

  1. clear your npm cache.
  2. reinstall Angular CLI
  3. create a new app

Commands:
npm cache clean --force
npm install -g @angular/cli@latest
ng new appname

This is working for me.

worked

@NoorMohammed993
Copy link

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 :)

worked for me

@gentleibkay
Copy link

Looks like solutions above worked for Windows .. Please anyone with solution for MacOs. I'm having this exact same problem. I have followed the above steps
npm cache clean --force
Reinstall Node
npm install -g @angular/cli
ng new newApp

This doesn't work for MacOs
⠋ Installing packages...npm WARN deprecated tslint@6.1.2: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! code EINTEGRITY
npm ERR! sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== integrity checksum failed when using sha512: wanted sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== but got sha512-SDNbdBTRZ2fssGLLtyrIoN+V9gJke5XIAQboHY6m9QiOEGOodbMwDtQxoxeS8EmkdlhAZm9kV9deY0opak43mw==. (5634503 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/adams.mayowa/.npm/_logs/2020-06-21T17_22_47_139Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.

@Raginig27
Copy link

I had been facing the same issue.
Try with following steps:

  1. clear your npm cache.
  2. reinstall Angular CLI
  3. create a new app

Commands:
npm cache clean --force
npm install -g @angular/cli@latest
ng new appname

This is working for me.

THIS ONE IS ASLO WORKED FOR ME.
THANKS A LOT

@d4ngeraman
Copy link

Looks like solutions above worked for Windows .. Please anyone with solution for MacOs. I'm having this exact same problem. I have followed the above steps
npm cache clean --force
Reinstall Node
npm install -g @angular/cli
ng new newApp

This doesn't work for MacOs
⠋ Installing packages...npm WARN deprecated tslint@6.1.2: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! code EINTEGRITY
npm ERR! sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== integrity checksum failed when using sha512: wanted sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== but got sha512-SDNbdBTRZ2fssGLLtyrIoN+V9gJke5XIAQboHY6m9QiOEGOodbMwDtQxoxeS8EmkdlhAZm9kV9deY0opak43mw==. (5634503 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/adams.mayowa/.npm/_logs/2020-06-21T17_22_47_139Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.

For MACBOOK, i updated angular, Node and NPM version to latest version

@gentleibkay
Copy link

I had been facing the same issue.
Try with following steps:

  1. clear your npm cache.
  2. reinstall Angular CLI
  3. create a new app

Commands:
npm cache clean --force
npm install -g @angular/cli@latest
ng new appname
This is working for me.

THIS ONE IS ASLO WORKED FOR ME.
THANKS A LOT

Thank you, all fixed now. restarting the PC after upgrade of Node, npm cache clean, reinstall Angular CLI worked for me

@RutujaGurav07
Copy link

I had been facing the same issue.
Try with following steps:

  1. clear your npm cache.
  2. reinstall Angular CLI
  3. create a new app

Commands:
npm cache clean --force
npm install -g @angular/cli@latest
ng new appname

This is working for me.

This worked for me
Thank you

@sukeshthakare
Copy link

npm cache clean --force

this command work for me.

@nabilahzaid
Copy link

nabilahzaid commented Aug 20, 2020

npm cache clean --force

Same here. This command work for me. I just happened to get into this problem today after I reinstall my npm and my node at v14+. After the npm cache clean the version become the older version and I managed to run the ng new command.

@vishwavrat2802
Copy link

I faced the same issue , but got resolved with this:-

npm cache clear --force

may the issue was because of the error
npm ERR! Unexpected end of JSON input while parsing near '...},"4.2.1":{"name":"@A'

@ranjbarhadi
Copy link

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

This solved the problem for me. my node version was 10 and I needed to upgrade it to version 12.

@anaarosal
Copy link

I tried every recommendation.
Nothing works. I gave up with Angular.
Two days later, it, magically, works.

WTF

@IsharaMee
Copy link

Clearing Nmp cache worked

npm cache clear --force

@sh178
Copy link

sh178 commented Oct 11, 2020

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.

how to upgrade?? which commands did u use?

@sh178
Copy link

sh178 commented Oct 11, 2020

Installing packages...npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN registry Unexpected warning for https://infyartifactory.ad.infosys.com/artifactory/api/npm/npm: Miscellaneous Warning ECONNRESET: request to https://infyartifactory.ad.infosys.com/artifactory/api/npm/npm/slash failed, reason: socket hang up
npm WARN registry Using stale data from https://infyartifactory.ad.infosys.com/artifactory/api/npm/npm due to a request error during revalidation.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
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\shiwangi02\AppData\Roaming\npm-cache_logs\2020-10-11T07_07_59_289Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.

i'm getting this error from yesterday, unable to resolve plz help.

@sh178
Copy link

sh178 commented Oct 11, 2020

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

yeah same, if you get plz tell me also

@savanipoojan78
Copy link

i am still having this problem tried everything
npm version :- 6.14.8
noed version :- 14.13.1
Angular CLI: 10.1.6

@darcyclarke darcyclarke added the Release 6.x work is associated with a specific npm 6 release label Oct 30, 2020
@darcyclarke
Copy link
Contributor

Closing: we don't support project-specific support/debugging but it looks like @Vipmat & @shiva-github both provided fairly good paths to resolving this issue for most folks (ref. #1191 (comment) & #1191 (comment) respectively)

If you have problems in the future w/ the Angular CLI, please file an issue over on their repo: https://github.com/angular/angular-cli

If you think you've found a problem with npm itself, please check to see if a bug has already been created in our backlog - for a similar problem - before using one of our templates to file the issue: https://github.com/npm/cli/issues/new/choose

@darcyclarke darcyclarke added this to the OSS - Sprint 19 milestone Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests