I am trying to downgrade from Angular 6 to 5 but somehow, the way to install specific version is not working on my machine. See below:
Note: I already uninstalled angular 6.
npm ERR! notarget No matching version found for #angular/cli#5.2.10
please help.
Thanks in advance!
Here are the logs:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli
'C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli '#angular/cli#5.2.10' ]
2 info using npm#6.0.0
3 info using node#v8.11.3
4 verbose npm-session 5c326aa0674c8d9b
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/#angular%2fcli 41ms
(from cache)
8 silly registry:manifest no matching version for #angular/cli#5.2.10
in the cache. Forcing revalidation
9 http fetch GET 304 https://registry.npmjs.org/#angular%2fcli 1013ms
(from cache)
10 silly fetchPackageMetaData error for #angular/cli#5.2.10 No
matching version found for #angular/cli#5.2.10
11 timing stage:rollbackFailedOptional Completed in 1ms
12 timing stage:runTopLevelLifecycles Completed in 1515ms
13 verbose type version
14 verbose stack #angular/cli: No matching version found for
#angular/cli#5.2.10
14 verbose stack at pickManifest
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\npm-pick-manifest\index.js:65:11)
14 verbose stack at fetchPackument.then.packument
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\manifest.js:52:18)
14 verbose stack at tryCatcher
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
14 verbose stack at Promise._settlePromiseFromHandler
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
14 verbose stack at Promise._settlePromise
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
14 verbose stack at Promise._settlePromise0
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
14 verbose stack at Promise._settlePromises
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
14 verbose stack at Async._drainQueue
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
14 verbose stack at Async._drainQueues
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
14 verbose stack at Immediate.Async.drainQueues
(C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
14 verbose stack at runCallback (timers.js:810:20)
14 verbose stack at tryOnImmediate (timers.js:768:5)
14 verbose stack at processImmediate [as _immediateCallback]
(timers.js:745:5)
15 verbose cwd C:\Users\TEUSER
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe"
"C:\Users\TEUSER\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js"
"install" "-g" "#angular/cli#5.2.10"
18 verbose node v8.11.3
19 verbose npm v6.0.0
20 error code ETARGET
21 error notarget No matching version found for #angular/cli#5.2.10
22 error notarget In most cases you or one of your dependencies are
requesting
22 error notarget a package version that doesn't exist.
23 verbose exit [ 1, true ]
npm uninstall -g #angular/cli
Then, run (--force flag might be required)
npm cache clean
or, if you're using npm > 5.
npm cache verify
[STEP 1] Install an angular-cli specific version
npm install -g #angular/cli#wished.version.here
[STEP 2] Create a project
ng new you-app-name
The resulting white app will be created in the desired angular version.
Related
Running
npm install -g typescript
Is giving me error:
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/REDACTED/.npm/_logs/2022-10-14T00_07_52_514Z-debug.log
(base) Webbs-MBP:~ REDACTED$
Not sure what this error means or why it's happening.
I'm able to install other packages globally, npm install -g ts-node works fine.
Looking at the log file I see:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/REDACTED/.nvm/versions/node/v14.19.0/bin/node',
1 verbose cli '/Users/REDACTED/.nvm/versions/node/v14.19.0/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'typescript'
1 verbose cli ]
2 info using npm#6.14.16
3 info using node#v14.19.0
4 verbose npm-session f9097623d247d337
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/typescript 326ms (from cache)
8 silly fetchPackageMetaData error for typescript#latest zlib: incorrect data check
9 timing stage:rollbackFailedOptional Completed in 13ms
10 timing stage:runTopLevelLifecycles Completed in 658ms
11 verbose stack ZlibError: zlib: incorrect data check
11 verbose stack at Unzip.write (/Users/REDACTED/.nvm/versions/node/v14.19.0/lib/node_modules/npm/node_modules/minizlib/index.js:147:22)
11 verbose stack at Object.write (/Users/REDACTED/.nvm/versions/node/v14.19.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:313:19)
11 verbose stack at PassThrough.ondata (internal/streams/readable.js:731:22)
11 verbose stack at PassThrough.emit (events.js:400:28)
11 verbose stack at addChunk (internal/streams/readable.js:293:12)
11 verbose stack at readableAddChunk (internal/streams/readable.js:267:9)
11 verbose stack at PassThrough.Readable.push (internal/streams/readable.js:206:10)
11 verbose stack at PassThrough.Transform.push (internal/streams/transform.js:166:32)
11 verbose stack at PassThrough.afterTransform (internal/streams/transform.js:101:10)
11 verbose stack at PassThrough._transform (internal/streams/passthrough.js:46:3)
11 verbose stack at PassThrough.Transform._read (internal/streams/transform.js:205:10)
11 verbose stack at PassThrough.Transform._write (internal/streams/transform.js:193:12)
11 verbose stack at writeOrBuffer (internal/streams/writable.js:358:12)
11 verbose stack at PassThrough.Writable.write (internal/streams/writable.js:303:10)
11 verbose stack at PassThrough.ondata (internal/streams/readable.js:731:22)
11 verbose stack at PassThrough.emit (events.js:400:28)
12 verbose cwd /Users/REDACTED
13 verbose Darwin 20.6.0
14 verbose argv "/Users/REDACTED/.nvm/versions/node/v14.19.0/bin/node" "/Users/REDACTED/.nvm/versions/node/v14.19.0/bin/npm" "install" "-g" "typescript"
15 verbose node v14.19.0
16 verbose npm v6.14.16
17 error code Z_DATA_ERROR
18 error errno -3
19 error zlib: incorrect data check
20 verbose exit [ -3, true ]
OS: macOSBigSur with M1 Chip
When I run this command:
npm install -g gulp-cli
I get this output:
npm ERR! code E503
npm ERR! 503 Service Unavailable: gulp-cli#latest
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-10-08T19_33_47_294Z-debug.log
This is what's on the log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '-g', 'gulp-cli' ]
2 info using npm#6.4.1
3 info using node#v8.16.1
4 verbose npm-session ea6642bf85c436af
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 503 https://registry.npmjs.org/gulp-cli 70153ms attempt #3
8 silly fetchPackageMetaData error for gulp-cli#latest 503 Service Unavailable: gulp-cli#latest
9 timing stage:rollbackFailedOptional Completed in 2ms
10 timing stage:runTopLevelLifecycles Completed in 70496ms
11 verbose stack Error: 503 Service Unavailable: gulp-cli#latest
11 verbose stack at fetch.then.res (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
11 verbose stack at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
11 verbose stack at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
11 verbose stack at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
11 verbose stack at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
11 verbose stack at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
11 verbose stack at Async._drainQueue (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
11 verbose stack at Async._drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
11 verbose stack at Immediate.Async.drainQueues (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
11 verbose stack at runCallback (timers.js:810:20)
11 verbose stack at tryOnImmediate (timers.js:768:5)
11 verbose stack at processImmediate [as _immediateCallback] (timers.js:745:5)
12 verbose cwd /home/usuario/php/router
13 verbose Linux 4.15.0-20-generic
14 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "gulp-cli"
15 verbose node v8.16.1
16 verbose npm v6.4.1
17 error code E503
18 error 503 Service Unavailable: gulp-cli#latest
19 verbose exit [ 1, true ]
How do I fix it?
npm version: 6.4.1
node version: v8.16.1
Upgrading either node or npm is not an option
Turns out the problem was with the company proxy, which couldn't resolve the address of registry.npmjs.com. The network manager configured it to pass through the proxy, but that also didn't help because npm ignored my NO_PROXY system config.
The only thing that did work was configuring npm to use another registry.
My project uses private registry packages along with common packages.
I setup my scope registry according to docs at https://docs.npmjs.com/misc/scope
here is config list output:
C:\Users\anam\Desktop\login_page>npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.4.1 node/v8.12.0 win32 x64"
; userconfig C:\Users\anam\.npmrc
#infromatica:registry = "http://infamvn:8081/nexus/content/groups/npmJs_GRP/"
email = "anam#informatica.com"
registry = "https://registry.npmjs.org/"
; builtin config undefined
prefix = "C:\\Users\\anam\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Users\anam\Desktop\login_page
; HOME = C:\Users\anam
; "npm config ls -l" to show all defaults.
When I try to install scoped packages I get:
C:\Users\anam\Desktop\login_page>npm i #informatica/archipelago-icons
npm ERR! code E404
npm ERR! 404 Not Found: #informatica/archipelago-icons#0.0.2
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\anam\AppData\Roaming\npm-cache\_logs\2018-10-10T08_57_43_329Z-debug.log
here is log file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'i',
1 verbose cli '#informatica/archipelago-icons' ]
2 info using npm#6.4.1
3 info using node#v8.12.0
4 verbose npm-session 758a10490a81bd2d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 https://registry.npmjs.org/#informatica%2farchipelago-icons 3339ms
8 silly fetchPackageMetaData error for #informatica/archipelago-icons#0.0.2 404 Not Found: #informatica/archipelago-icons#0.0.2
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 3589ms
11 verbose stack Error: 404 Not Found: #informatica/archipelago-icons#0.0.2
11 verbose stack at fetch.then.res (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
11 verbose stack at tryCatcher (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
11 verbose stack at Promise._settlePromiseFromHandler (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
11 verbose stack at Promise._settlePromise (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
11 verbose stack at Promise._settlePromise0 (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
11 verbose stack at Promise._settlePromises (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
11 verbose stack at Async._drainQueue (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
11 verbose stack at Async._drainQueues (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
11 verbose stack at Immediate.Async.drainQueues (C:\Users\anam\AppData\Roaming\nvm\v8.12.0\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
11 verbose stack at runCallback (timers.js:810:20)
11 verbose stack at tryOnImmediate (timers.js:768:5)
11 verbose stack at processImmediate [as _immediateCallback] (timers.js:745:5)
12 verbose cwd C:\Users\anam\Desktop\login_page
13 verbose Windows_NT 10.0.16299
14 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "#informatica/archipelago-icons"
15 verbose node v8.12.0
16 verbose npm v6.4.1
17 error code E404
18 error 404 Not Found: #informatica/archipelago-icons#0.0.2
19 verbose exit [ 1, true ]
Pay attention to line 7:
7 http fetch GET 404 https://registry.npmjs.org/#informatica%2farchipelago-icons
It seems like it looks for the package in the default registry instead of scoped.
Any help is appreciated.
Thank you.
It turned out the cause of the error was wrong scope naming:
#infromatica:registry = "http://infamvn:8081/nexus/content/groups/npmJs_GRP/"
After I run this command:
npm install -g npm-windows-upgrade
I am getting this error:
PS C:\WINDOWS\system32> npm install -g npm-windows-upgrade
npm ERR! code E404
npm ERR! 404 Not Found: npm-windows-upgrade#latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USERS1\AppData\Roaming\npm-cache\_logs\2018-04-12T15_31_25_623Z-debug.log
Here is the log file
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\USER1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'npm-windows-upgrade' ]
2 info using npm#5.6.0
3 info using node#v8.9.3
4 verbose npm-session 4b47ac8f869b6388
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/moment.js/npm-windows-upgrade 119130ms attempt #3
8 silly fetchPackageMetaData error for npm-windows-upgrade#latest 404 Not Found: npm-windows-upgrade#latest
9 verbose stack Error: 404 Not Found: npm-windows-upgrade#latest
9 verbose stack at fetch.then.res (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
9 verbose stack at tryCatcher (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
9 verbose stack at Promise._settlePromise (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
9 verbose stack at Promise._settlePromise0 (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
9 verbose stack at Promise._settlePromises (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
9 verbose stack at Async._drainQueue (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
9 verbose stack at Async._drainQueues (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues (C:\Users\USER1\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
9 verbose stack at runCallback (timers.js:789:20)
9 verbose stack at tryOnImmediate (timers.js:751:5)
9 verbose stack at processImmediate [as _immediateCallback] (timers.js:722:5)
10 verbose cwd C:\WINDOWS\system32
11 verbose Windows_NT 10.0.16299
12 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\USER1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "npm-windows-upgrade"
13 verbose node v8.9.3
14 verbose npm v5.6.0
15 error code E404
16 error 404 Not Found: npm-windows-upgrade#latest
17 verbose exit [ 1, true ]
What needs to be done?
Thanks-
We have setup an npm with jfrog artifactory saas. The npm has both npm-local and npm-remote repository.
The npm-remote repository points to https://registry.npmjs.org with default settings.
I have the ~/.npmrc as follows (following instructions from artifactory)
_auth="[auth]"
email=[email address]
always-auth=true
registry=https://[company-name].jfrog.io/centricsoftware/api/npm/npm/
I was even able to publish an npm module to the jfrog artifactory server.
The trouble I have with install npm modules via jfrog artifactory
$>npm install express
npm ERR! code E401
npm ERR! 401 Unauthorized: express#^4.15.3
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/[user]/.npm/_logs/2017-06-28T12_14_24_852Z-debug.log
The contents of the log file are as follows
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'express' ]
2 info using npm#5.0.4
3 info using node#v8.1.2
4 verbose npm-session 91f67a25a5bc9570
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 401 https://centricsoftware.jfrog.io/centricsoftware/api/npm/npm/express 6360ms
8 silly fetchPackageMetaData error for express#^4.15.3 401 Unauthorized: express#^4.15.3
9 verbose stack Error: 401 Unauthorized: express#^4.15.3
9 verbose stack at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:41:19)
9 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
9 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
9 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
9 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
9 verbose stack at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
9 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
9 verbose stack at runCallback (timers.js:800:20)
9 verbose stack at tryOnImmediate (timers.js:762:5)
9 verbose stack at processImmediate [as _immediateCallback] (timers.js:733:5)
10 verbose cwd /Users/rohitghatol/tmp/try
11 verbose Darwin 16.6.0
12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express"
13 verbose node v8.1.2
14 verbose npm v5.0.4
15 error code E401
16 error 401 Unauthorized: express#^4.15.3
17 verbose exit [ 1, true ]
What am I going wrong here?
Cheers
Rohit
The problem is related to this npm issue which was introduced with the npm 5.0 release.
A fix for this issue will be deployed to Artifactory SaaS in the next couple of days.
In addition, the npm team is working on a fix on the client side as well.