Since I updated to npm 6.9.0 (node 8.12.0) I'm getting this error when running npm outdated:
$ npm outdated
npm ERR! Not implemented yet
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jgallaso/.npm/_logs/2019-04-10T11_13_48_791Z-debug.log
The logs shows this error:
173 verbose stack Error: Not implemented yet
173 verbose stack at Object.packument (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/pacote/lib/fetchers/remote.js:12:22)
173 verbose stack at Object.Fetcher#packument [as packument] (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/genfun/lib/genfun.js:15:38)
173 verbose stack at packument (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/pacote/lib/fetch.js:17:18)
173 verbose stack at pinflight (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/pacote/packument.js:23:12)
173 verbose stack at /Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:29:24
173 verbose stack at Promise._execute (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/debuggability.js:313:9)
173 verbose stack at Promise._resolveFromExecutor (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:483:18)
173 verbose stack at new Promise (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:79:10)
173 verbose stack at _inflight (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:28:25)
173 verbose stack at /Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:22:14
173 verbose stack at tryCatcher (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
173 verbose stack at Promise._settlePromiseFromHandler (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
173 verbose stack at Promise._settlePromise (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
173 verbose stack at Promise._settlePromiseCtx (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:606:10)
173 verbose stack at _drainQueueStep (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:142:12)
173 verbose stack at _drainQueue (/Users/jgallaso/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
When I run npm outdated on a specific package, for instance eslint I get the proper output:
$ npm outdated eslint
Package Current Wanted Latest Location
eslint 5.15.1 5.16.0 5.16.0
What's happening here? Is it due to some buggy package or a bug NPM itself?
As a temporal solution you can install the latest npm:
npm i npm -g
npm i then npm update worked for me.
Related
So as part of some work I'm doing, I am trying to get the packages we use in our application up to the latest versions as when running npm audit there were a significant amount of vulnerabilities.
One of the the things it comes up saying to install mocha#9.2.2
I have been trying to do this but I get an error saying:
npm ERR! Invalid version: ^6.0.1
I have no idea what this is referring to as in the package.json there are no packages that have this version and when I look at the debug log I just get:
207 verbose stack TypeError: Invalid Version: ^6.0.1
207 verbose stack at new SemVer (C:\Program Files\nodejs\node_modules\npm\node_modules\semver\classes\semver.js:38:13)
207 verbose stack at compare (C:\Program Files\nodejs\node_modules\npm\node_modules\semver\functions\compare.js:3:32)
207 verbose stack at Object.gte (C:\Program Files\nodejs\node_modules\npm\node_modules\semver\functions\gte.js:2:30)
207 verbose stack at CanPlaceDep.checkCanPlaceCurrent (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\can-place-dep.js:173:51)
207 verbose stack at CanPlaceDep.checkCanPlace (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\can-place-dep.js:157:27)
207 verbose stack at new CanPlaceDep (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\can-place-dep.js:114:26)
207 verbose stack at PlaceDep.place (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\place-dep.js:121:19)
207 verbose stack at new PlaceDep (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\place-dep.js:71:10)
207 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:949:31
207 verbose stack at Array.map (<anonymous>)
208 verbose cwd C:\tfs\Agility\Branches\AgilityMakeover\Client\Web\AgilityItemViewer
209 verbose Windows_NT 10.0.19044
210 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mocha#9.2.2"
211 verbose node v16.14.0
212 verbose npm v8.3.1
213 error Invalid Version: ^6.0.1
214 verbose exit 1
So I have no idea what this could be referring to, as far as I can tell there is no package reference. I have tried just removing the package-lock.json file and the deleting the node_modules folder and running npm install again but I keep getting this error. But I have no clue on how to progress, any advice would be appreciated
What eventually seemed to solve the problem for me was going through the list of packages shown i.e semver, can-place-dep etc and updating them all manually by doing: npm update semver and so on. I then deleted my package-lock.json and node_modules folder again and did npm install. After this I stopped getting the invalid version error. Hopefully this can help someone else if they end up having the same issue I had
Try this
Delete npm_modules folder
Delete the package.json.lock file
run npm cache clean --force
And try npm install
I am getting this error when install the node modules(npm install). Why this issue happening in react native project? Is this related to node version ?
Error :
npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name ">=^16.8.1":
Tags may not have any characters that encodeURIComponent encodes. npm
ERR! A complete log of this run can be found in:
/Users/abcdef/.npm/_logs/2021-08-02T05_31_11_609Z-debug.log
Error Log (debug.log)
109 verbose stack Error: Invalid tag name ">=^16.8.1": Tags may not have any characters that encodeURIComponent encodes.
109 verbose stack at invalidTagName (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:89:15)
109 verbose stack at fromRegistry (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:343:13)
109 verbose stack at Function.resolve (/usr/local/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:80:12)
109 verbose stack at Arborist.[nodeFromEdge] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:949:37)
109 verbose stack at async Arborist.[loadPeerSet] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:1170:23)
109 verbose stack at async Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:886:11)
109 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
109 verbose stack at async Promise.all (index 1)
109 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:134:5)
109 verbose stack at async Install.install (/usr/local/lib/node_modules/npm/lib/install.js:150:5)
110 verbose cwd /Users/abcde/Project/XXX/Workspace/xyz-app
111 verbose Darwin 19.6.0
112 verbose argv "/usr/local/Cellar/node/16.4.2/bin/node" "/usr/local/bin/npm" "i"
113 verbose node v16.4.2
114 verbose npm v7.20.2
115 error code EINVALIDTAGNAME
116 error Invalid tag name ">=^16.8.1": Tags may not have any characters that encodeURIComponent encodes.
117 verbose exit 1
I got the solution for this issue. We can fix this issue in two ways,
Downgrade the npm version(In my case, I have downgraded it to 6.14.14 after that it's working fine.)
npm install -g npm#6.14.14
In the terminal, navigate to your project root directory and run this
npm install --legacy-peer-deps
I have a package that I manually updated in order to have multiple versions of the same tool running (as explained here).
Now, when I execute npm -g outdated, I am getting the following output:
$ npm -g outdate
npm notice
npm notice New minor version of npm available! 7.18.1 -> 7.20.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.20.1
npm notice Run npm install -g npm#7.20.1 to update!
npm notice
npm ERR! code ENOVERSIONS
npm ERR! No versions available for ask-cli-1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/b/.npm/_logs/2021-07-24T13_02_50_529Z-debug.log
Here are the contents of the log, edited for brevity:
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', '-g', 'update' ]
1 info using npm#7.18.1
2 info using node#v16.4.1
...
9 timing config:load:file:/usr/local/lib/node_modules/ask-cli-1/.npmrc Completed in 0ms
...
33 silly fetch manifest ask-cli-1#*
34 http fetch GET 200 https://registry.npmjs.org/ask-cli-1 38ms (cache hit)
...
40 silly placeDep ROOT ask-cli-1# OK for: want: *
...
316 timing idealTree:node_modules/ask-cli-1 Completed in 0ms
...
1338 verbose stack ask-cli-1: No versions available for ask-cli-1
1338 verbose stack at pickManifest (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:140:25)
1338 verbose stack at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:187:16)
1338 verbose stack at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
1338 verbose stack at async Arborist.[nodeFromEdge] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:936:19)
1338 verbose stack at async Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:882:11)
1338 verbose stack at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
1338 verbose stack at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/reify.js:134:5)
1338 verbose stack at async Update.update (/usr/local/lib/node_modules/npm/lib/update.js:72:5)
1339 verbose cwd /usr/local/lib/node_modules/ask-cli-1
1340 verbose Darwin 20.5.0
1341 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "update"
1342 verbose node v16.4.1
1343 verbose npm v7.18.1
1344 error code ENOVERSIONS
1345 error No versions available for ask-cli-1
1346 verbose exit 1
Is there a way to avoid npm looking for a version of ask-cli-1?
You can't exclude a package with npm outdated.
But I recomemnd this package: check-outdated
In your case npm i -g check-outdated
Then:
check-outdated --ignore-packages ask-cli-1 --columns name,type,current,latest,changes
Hyperledger Fabric Commercial paper example (https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html) is giving me this error when I try to install the Magneto application dependencies using npm install.
Log:
1359 verbose stack Error: grpc#1.17.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
1359 verbose stack Exit status 1
1359 verbose stack at EventEmitter.<anonymous> (/home/hyperfabric/.nvm/versions/node/v12.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
1359 verbose stack at EventEmitter.emit (events.js:200:13)
1359 verbose stack at ChildProcess.<anonymous> (/home/hyperfabric/.nvm/versions/node/v12.4.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1359 verbose stack at ChildProcess.emit (events.js:200:13)
1359 verbose stack at maybeClose (internal/child_process.js:1021:16)
1359 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
1360 verbose pkgid grpc#1.17.0
1361 verbose cwd /home/hyperfabric/go/src/testFabric/fabric-samples/commercial-paper/organization/magnetocorp/application
1362 verbose Linux 4.15.0-51-generic
1363 verbose argv "/home/hyperfabric/.nvm/versions/node/v12.4.0/bin/node" "/home/hyperfabric/.nvm/versions/node/v12.4.0/bin/npm" "install"
1364 verbose node v12.4.0
1365 verbose npm v6.9.0
1366 error code ELIFECYCLE
1367 error errno 1
1368 error grpc#1.17.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
1368 error Exit status 1
1369 error Failed at the grpc#1.17.0 install script.
1369 error This is probably not a problem with npm. There is likely additional logging output above.
1370 verbose exit [ 1, true ]
You are using an unsupported version of Node.js to build the project, Fabric currently supports Node builds with a version on 8.9.x, I recommend you take a look at the prereqs here and make sure you have satisfied them all:
https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html
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.