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/"
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
I started with:
Installing Node.js on my Windows 10 System (I installed v12.18.3)
Then I ran command: npm i -g expo-cli
to install expo on my system
Next I ran expo init demoProject
Next I changed directory into the demoProject (C:\Users\vridd>cd DoneWithIt)
Next I used command code . to start Visual Studio and in the terminal in VS Code, I ran npm start
As soon as I run this, I keep getting this issue. Please help!
0 info it worked if it ends with ok
1 verbose cli [
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 'start'
1 verbose cli ]
2 info using npm#6.14.6
3 info using node#v12.18.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle #~prestart: #
6 info lifecycle #~start: #
7 verbose lifecycle #~start: unsafe-perm in lifecycle true
8 verbose lifecycle #~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\vridd\DoneWithIt\node_modules\.bin;C:\Program Files\Java\jdk-14.0.1\bin;C:\Program Files\nodejs\;C:\Program Files\Java\jdk-14.0.1\bin;C:\Program Files\nodejs\;;C:\Users\vridd\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\vridd\AppData\Roaming\npm
9 verbose lifecycle #~start: CWD: C:\Users\vridd\DoneWithIt
10 silly lifecycle #~start: Args: [ '/d /s /c', 'expo start' ]
11 silly lifecycle #~start: Returned: code: 1 signal: null
12 info lifecycle #~start: Failed to exec start script
13 verbose stack Error: # start: `expo start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid #
15 verbose cwd C:\Users\vridd\DoneWithIt
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error # start: `expo start`
22 error Exit status 1
23 error Failed at the # start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I solved this by updating to the latest npm version (npm install latest-version) and doing an npm update on my project. From what I could tell from searching, it seems that some versions of Node and NPM don't play well together.
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.
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.
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-