简体   繁体   中英

Angular project dependency installation with npm install in Ubuntu facing an error

I installed angular cli version 7.3.8 linked the same using npm link. Then tried to do npm install .

This results in an error:

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/usr/mkl/node_modules/@angular-devkit/core/node_modules/fast-json-stable-stringify/package.json.2754642779
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/usr/mkl/node_modules/@angular-devkit/core/node_modules/fast-json-stable-stringify/package.json.2754642779'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/usr/.npm/_logs/2020-09-30T14_28_47_932Z-debug.log

I've tried multiple ways to resolve this, namely removing node_modules and trying npm install once again and so on but to no avail.

npm version is 6.14.6

Angular version is:

Angular CLI: 7.3.8
Node: 12.18.3
OS: linux x64
Angular: 8.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.8 (cli-only)
@angular-devkit/build-angular     0.1001.3
@angular-devkit/build-optimizer   0.803.29
@angular-devkit/core              7.3.8 (cli-only)
@angular-devkit/schematics        7.3.8 (cli-only)
@angular/cli                      7.3.8
@angular/http                     7.2.16
@schematics/angular               7.3.8 (cli-only)
@schematics/update                0.13.8 (cli-only)
rxjs                              6.6.3
typescript                        3.4.5
webpack                           4.39.2

I just switched from npm to yarn and am able to install all dependencies without any issues.

I'll just post this here in case a better answer comes up.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM