简体   繁体   English

在进行npm安装时,Sinon没有安装

[英]Sinon not installing while doing npm install

I am doing 我在做

npm install Sinon npm安装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 节点8.9.4

Npm 5.7.1 Npm 5.7.1

There's apparently some issue with the encodeURI. 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. 用于作用域的包的倾斜斜线转换为%2f,因此您找不到404包。 Long story short, removing the ~/.npmrc file fixed it for me . 长话短说, 删除〜/ .npmrc文件为我修复了它 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 看看这里和威胁中的链接: 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. 我正在使用版本的webpack 3.9.1并按照那里的说法升级,但我仍然遇到npm的问题,我的错误信息不完全相同,但我非常肯定npm@5.7.1导致问题。

Maybe you will have more luck than me, trying that bit with webpack, assuming you have it installed. 也许你会比我更幸运,尝试使用webpack,假设你安装了它。

It looks like the core of the issue is lack of support for scoped packages in caches (Sinopia) and registries (Artifactory). 看起来问题的核心是缺乏对缓存(Sinopia)和注册表(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). 这个问题正在https://github.com/sinonjs/formatio/issues/14中进行跟踪,其中解决方案包括删除~/.npmrc (有时包含指令以始终使用不同的注册表)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM