I am doing
npm install Sinon
the error that I am getting is
32 verbose stack Error: 404 Not Found: #sinonjs/formatio#^2.0.0
32 verbose stack at fetch.then.res (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
32 verbose stack at tryCatcher (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
32 verbose stack at Promise._settlePromiseFromHandler (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
32 verbose stack at Promise._settlePromise (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
32 verbose stack at Promise._settlePromise0 (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
32 verbose stack at Promise._settlePromises (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
32 verbose stack at Async._drainQueue (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
32 verbose stack at Async._drainQueues (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
32 verbose stack at Immediate.Async.drainQueues (C:\Users\gvqc48\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
32 verbose stack at runCallback (timers.js:789:20)
32 verbose stack at tryOnImmediate (timers.js:751:5)
32 verbose stack at processImmediate [as _immediateCallback] (timers.js:722:5)
34 verbose Windows_NT 10.0.15063
35 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\gvqc48\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "sinon" "--save-dev"
36 verbose node v8.9.4
37 verbose npm v5.7.1
38 error code E404
39 error 404 Not Found: #sinonjs/formatio#^2.0.0
40 verbose exit [ 1, true ]
I am running
Node 8.9.4
Npm 5.7.1
There's apparently some issue with the encodeURI. Which can be caused by a lot of things. The sloped slashdot for scoped packages gets turned into %2f, so you get a 404 package not found.
Long story short, removing the ~/.npmrc file fixed it for me. Be careful to back it up since it may also contain useful stuff in there.
Have a look here and the links in the threat: https://github.com/sinonjs/formatio/issues/14#issuecomment-371681402
Someone was having the same issue here
I was using version webpack 3.9.1 and upgraded as told there, but I am still having the issue with npm, my error message is not exactly the same but I am quite positive npm#5.7.1 is causing the issue.
Maybe you will have more luck than me, trying that bit with webpack, assuming you have it installed.
It looks like the core of the issue is lack of support for scoped packages in caches (Sinopia) and registries (Artifactory).
This issues is being tracked in https://github.com/sinonjs/formatio/issues/14, where solutions include removing ~/.npmrc (which sometimes contain directives to always use a different registry).
Related
Has anyone been able to successfully install node-calls-python package on their Mac M1. When I try to npm install I get the following error:
31 verbose stack Error: Invalid tag name "g++": Tags may not have any characters that encodeURIComponent encodes.
31 verbose stack at invalidTagName (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:89:15)
31 verbose stack at fromRegistry (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:343:13)
31 verbose stack at resolve (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:80:12)
31 verbose stack at npa (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:48:10)
31 verbose stack at /Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:503:50
31 verbose stack at Array.map (<anonymous>)
31 verbose stack at Arborist.[add] (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:500:28)
31 verbose stack at Arborist.[applyUserRequestsToNode] (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:471:23)
31 verbose stack at Arborist.[applyUserRequests] (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:408:43)
31 verbose stack at Arborist.buildIdealTree (/Users/<here>/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/arborist/build-ideal-tree.js:215:37)
32 verbose cwd /Users/<here>/Documents/workspace/RnD/nodePythonApp
33 verbose Darwin 21.6.0
34 verbose argv "/Users/<here>/.nvm/versions/node/v16.13.2/bin/node" "/Users/<here>/.nvm/versions/node/v16.13.2/bin/npm" "install" "g++"
35 verbose node v16.13.2
36 verbose npm v8.1.2
37 error code EINVALIDTAGNAME
38 error Invalid tag name "g++": Tags may not have any characters that encodeURIComponent encodes.
I've tried the recommend installation provided on the npm package page and did not work.
https://www.npmjs.com/package/node-calls-python
Any help would be appreciated.
Getting error 404 while running npm install create-react-app or npm install -g npm#latest.
Log:
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 'install',
1 verbose cli 'create-react-app' ]
2 info using npm#5.6.0
3 info using node#v8.11.3
4 verbose npm-session 1f3eafc1b2f09e93
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 http://registry.npmjs.org/create-react-app 66ms
8 silly fetchPackageMetaData error for create-react-app#latest 404 Not Found: create-react-app#latest
9 verbose stack Error: 404 Not Found: create-react-app#latest
9 verbose stack at fetch.then.res (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
9 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
9 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
9 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
9 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
9 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
9 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
9 verbose stack at runCallback (timers.js:810:20)
9 verbose stack at tryOnImmediate (timers.js:768:5)
9 verbose stack at processImmediate [as _immediateCallback] (timers.js:745:5)
10 verbose cwd M:\Projects\TestApps\ReactApp
11 verbose Windows_NT 6.1.7601
12 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "create-react-app"
13 verbose node v8.11.3
14 verbose npm v5.6.0
15 error code E404
16 error 404 Not Found: create-react-app#latest
17 verbose exit [ 1, true ]
First check if is a Proxy Issue.
Try to install the package with another internet connection!
Another causes
Missing repository registry
$ npm set registry https://registry.npmjs.org/
Clean cache
$ npm cache clean
$ npm rebuild
My problem also same but when I try following commands then works fine
If you've previously installed create-react-app globally via npm install -g create-react-app, I recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version.
Then reinstall using
npm install -g create-react-app
You have already installed the npm create-react-app globally. You can just write
npm init react-app *projectFolderName*
and it will work just fine.
I was having the same problem for almost a week here is my simple solution if you are using windows 1 run cmd as admin, 2 put this url 'npm config set registry https://skimdb.npmjs.com/registry' on cmd,3 then type 'npx create-react-app#latest YourProjectName'
The newest way to do this would be to use npx.
npx create-react-app my-app [...options]
I use this method because I also use nvm to manage node installs. Everything just plays nice with this method.
Try uninstalling the current version of npm and install the latest version using
npm install -g create-react-app
For me restarting my code editor did the job
You can try this command, which has worked for me:
npm config set strict-ssl false
npm ERR! code E400
npm ERR! 400 Bad Request: typescript#https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! /home/david/.npm/_logs/2018-06-01T08_01_21_010Z-debug.log
I get this Error when I start npm i without sudo. With sudo it works fine. I fixed all the permissions, installed node without sudo, but the error still occurs.
node -v
v8.11.2
npm -v
5.6.0
Edit1:
Here are the last lines of the logfile:
9991 verbose stack Error: 400 Bad Request: typescript#https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz
9991 verbose stack at fetch.then.res (/usr/lib64/node_modules/npm8/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
9991 verbose stack at tryCatcher (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/util.js:16:23)
9991 verbose stack at Promise._settlePromiseFromHandler (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/promise.js:512:31)
9991 verbose stack at Promise._settlePromise (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/promise.js:569:18)
9991 verbose stack at Promise._settlePromise0 (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/promise.js:614:10)
9991 verbose stack at Promise._settlePromises (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/promise.js:693:18)
9991 verbose stack at Async._drainQueue (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/async.js:133:16)
9991 verbose stack at Async._drainQueues (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/async.js:143:10)
9991 verbose stack at Immediate.Async.drainQueues (/usr/lib64/node_modules/npm8/node_modules/bluebird/js/release/async.js:17:14)
9991 verbose stack at runCallback (timers.js:810:20)
9991 verbose stack at tryOnImmediate (timers.js:768:5)
9991 verbose stack at processImmediate [as _immediateCallback] (timers.js:745:5)
9992 verbose cwd /home/david/Dev/Projects/MobileInfoApp/LHMobileApp
9993 verbose Linux 4.16.12-1-default
9994 verbose argv "/usr/bin/node8" "/usr/bin/npm-default" "i"
9995 verbose node v8.11.2
9996 verbose npm v5.6.0
9997 error code E400
9998 error 400 Bad Request: typescript#https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz
9999 verbose exit [ 1, true ]
Edit2: I reinstalled node again and followed a guide, I get a diffrent error now:
Unhandled rejection Error: invalid config key requested: singleuffer#5.1.2 extracted to /home/david/Dev/Projects/MobileInfoApp/LHMobileApp/n
at pudGet (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:31:11)
at FiggyPudding.get (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:13:12)
at Object.get (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:71:16)
at _parse (/usr/local/lib/node_modules/npm/node_modules/ssri/index.js:138:12)
at parse (/usr/local/lib/node_modules/npm/node_modules/ssri/index.js:125:12)
at Object.checkData (/usr/local/lib/node_modules/npm/node_modules/ssri/index.js:216:9)
at write (/usr/local/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:34:31)
at putData (/usr/local/lib/node_modules/npm/node_modules/cacache/put.js:25:10)
at Object.x.put (/usr/local/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
at readFileAsync.then.data (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/david/.npm/_logs/2018-06-04T07_53_53_015Z-debug.log
This is definitely folder permission issue. There are multiple ways for solving this, which is explained in detail in this article.
Installing global node modules (Linux and Mac)
For Debian Distros, following should let you run npm install without sudo.
Change your npm prefix to somewhere that your user has permission to write to
npm config set prefix=$HOME/david/
Then run the following and add it to .bashrc
export PATH=$HOME/david/bin:$PATH
Take ownership of /usr/local
sudo chown -R $USER /usr/local
Credit goes here
I am getting this error when trying to install nodemon in a brand new node project.
I've created a blank folder named my-project
then, inside it, I've executed to creeate a package.json file:
npm init -f
then when tryed to run
npm install --save-dev nodemon
And that was the result:
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for timed-out
I've just update my node version to the latest one and so npm tools.
node --version -> v8.9.4
npm --version -> 5.6.0
The funny part is that I've done this same steps in another computer 2 days ago with no problem.
325 verbose stack timed-out: No valid versions available for timed-out
325 verbose stack at pickManifest (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\node_modules\npm-pick-manifest\index.js:20:11)
325 verbose stack at fetchPackument.then.packument (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\manifest.js:39:14)
325 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
325 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
325 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
325 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
325 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
325 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
325 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
325 verbose stack at Immediate.Async.drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
325 verbose stack at runCallback (timers.js:789:20)
325 verbose stack at tryOnImmediate (timers.js:751:5)
325 verbose stack at processImmediate [as _immediateCallback] (timers.js:722:5)
326 verbose cwd E:\githubprojects\my-project\server
327 verbose Windows_NT 10.0.16299
328 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "nodemon#v1.14.7"
329 verbose node v8.9.4
330 verbose npm v5.6.0
331 error code ENOVERSIONS
332 error No valid versions available for timed-out
333 verbose exit [ 1, true ]
Official issue: https://github.com/npm/registry/issues/255
Official status: https://status.npmjs.org/incidents/41zfb8qpvrdj
Several packages including "require-from-string" are currently unavailable. We are aware of the issue and are working to restore the affected user and packages. Please do not attempt to republish packages, as this will hinder our progress in restoring them.
Update from NPM:
Resolved
We apologize for the temporary unavailability of some packages. We will be publishing a comprehensive post-mortem update in the next few days.
Posted Jan 06, 2018 - 23:14 UTC
timed-out is a npm package that is apparently missing, as of the last day, or hour, or minutes (I don't know the time span).
/Users/Stan ==> npm install timed-out -g
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for timed-out
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Stan/.npm/_logs/2018-01-06T20_26_40_854Z-debug.log
Now it is working.
/Users/Stan ==> npm install timed-out -g
+ timed-out#4.0.1
added 1 package in 1.306s
It's not you, it's an already known issue, due to dependency problems.
More details here https://github.com/remy/nodemon/issues/1210
Users are reporting that packages are being made available again. Try again and see if your issue is resolved.
https://github.com/npm/registry/issues/255
I am getting a 404 error when trying to link a local module with npm following the docs
Inside the local module directory seems like it creates a global link correctly:
$ npm link
/usr/local/lib/node_modules/my-module-name -> /Users/XXX/my-module-directory/my-module-name
But when just after that I try to link this from other project directory i get an 404 error:
$ npm link my-module-name
npm ERR! code E404
npm ERR! 404 Not Found: my-module-name#latest
I've tried to unlink the module and link again or change versions but it doesn't work.
Here is full log:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/XXX/.nvm/versions/node/v8.2.1/bin/node',
1 verbose cli '/Users/XXX/.nvm/versions/node/v8.2.1/bin/npm',
1 verbose cli 'link',
1 verbose cli 'my-module-name' ]
2 info using npm#5.3.0
3 info using node#v8.2.1
4 verbose npm-session 7d82e8d8dc1bdc83
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/my-module-name 2304ms
8 silly fetchPackageMetaData error for my-module-name#latest 404 Not Found: my-module-name#latest
9 verbose stack Error: 404 Not Found: my-module-name#latest
9 verbose stack at fetch.then.res (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:41:19)
9 verbose stack at tryCatcher (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
9 verbose stack at Promise._settlePromiseFromHandler (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
9 verbose stack at Promise._settlePromise (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
9 verbose stack at Promise._settlePromise0 (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
9 verbose stack at Promise._settlePromises (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
9 verbose stack at Async._drainQueue (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
9 verbose stack at Async._drainQueues (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
9 verbose stack at Immediate.Async.drainQueues (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
9 verbose stack at runCallback (timers.js:781:20)
9 verbose stack at tryOnImmediate (timers.js:743:5)
9 verbose stack at processImmediate [as _immediateCallback] (timers.js:714:5)
10 verbose cwd /Users/XXX/my-project-directory
11 verbose Darwin 16.6.0
12 verbose argv "/Users/XXX/.nvm/versions/node/v8.2.1/bin/node" "/Users/XXX/.nvm/versions/node/v8.2.1/bin/npm" "link" "my-module-name"
13 verbose node v8.2.1
14 verbose npm v5.3.0
15 error code E404
16 error 404 Not Found: my-module-name#latest
17 verbose exit [ 1, true ]
You're using an NVM-installed version of Node.js to run npm link my-module-name, but you didn't run npm link (in your module's directory) using that same version.
The initial link is created in /usr/local/lib/node_modules, but when you use NVM, each Node.js version gets their own "lib" directory, in your example /Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules, which is a different directory.