简体   繁体   中英

Create new Angular project - Package install failed

Angular CLI: 8.3.8
Node: 10.16.3
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.803.8
@angular-devkit/core         8.3.8
@angular-devkit/schematics   8.3.8
@angular/cli                 8.3.8
@schematics/angular          8.3.8
@schematics/update           0.803.8

When I try to create a new project: ng new projectName , I get the following error:

npm ERR. code ETARGET npm ERR. notarget No matching version found for @angular-devkit/architect@0.803.12 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of '@angular-devkit/build-angular' npm ERR! notarget

npm ERR: A complete log of this run can be found in. npm ERR. /Users/me/,npm/_logs/2019-10-21T08_48_20_226Z-debug.log Package install failed, see above.

Here is the log file contains:

2488 verbose type version 2489 verbose stack @angular-devkit/architect: No matching version found for @angular-devkit/architect@0.803.12. 2489 verbose stack at pickManifest (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:122:13) 2489 verbose stack at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:24:14 2489 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 2489 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31) 2489 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18) 2489 verbose stack at Promise._settlePromiseCtx (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:611:10) 2489 verbose stack at _drainQueueStep (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:142:12) 2489 verbose stack at _drainQueue (/usr/local/lib/ node_modules/npm/node_modules/bluebird/js/release/async.js:131:9) 2489 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5) 2489 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14) 2489 verbose stack at processImmediate (internal/timers.js:439:21) 2490 verbose cwd /Users/me/AngularLab/myWorkSpace/projectName 2491 verbose Darwin 16.7.0 2492 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--quiet" 2493 verbose node v12.13.0 2494 verbose npm v6.12.0 2495 error code ETARGET 2496 error notarget No matching version found for @angular-devkit/architect@0.803.12. 2497 error notarget In most cases you or one of your dependencies are requesting 2497 error notarget a package version that doesn't exist. 2497 error notarget 2497 error notarget It was specified as a dependency of '@angular-devkit/build-angular' 2498 verbose exit [ 1, true ]

Any idea please where I'am going wrong?

try this command

npm install -g @angular-devkit/build-angular
1.check node version
node -v

2.if not installed then follow the below 
Go to the Node.js Downloads page
Download Node.js for macOS by clicking the "Macintosh Installer" option
Run the downloaded Node.js .pkg Installer
Run the installer, including accepting the license, selecting the destination, and authenticating for the install.

3.check for npm
npm -v

4.install npm
npm install npm -g

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