npm ERR! Error: Method Not Allowed 和 npm ERR! code ETARGET npm ERR! code EINTEGRITY 解决方法

 

我们在使用前后端分离的时候,下载前端的项目,要对项目进行初始化。在初始化过程中我们会遇到如下的问题。 

npm WARN package.json [email protected] 'repositories' (plural) Not supported. Please pick one as the 'repository' field

npm ERR! Error: Method Not Allowed

npm ERR! at errorResponse (D:\IDE\nodejs\node_modules\npm\lib\cache\add-named.js:260:10)

npm ERR! at D:\IDE\nodejs\node_modules\npm\lib\cache\add-named.js:203:12

npm ERR! at saved (D:\IDE\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:167:7)

npm ERR! at Object.oncomplete (fs.js:108:15)

npm ERR! If you need help, you may report this *entire* log,

npm ERR! including the npm and node versions, at:

npm ERR! ;

 

解决方法重新安装 node.js

参照:https://github.com/npm/npm/issues/20830

如果安装或者更新不了,可以把安装目录下面的 含有 npm的文件移动到一个备份文件就可以做相应的安装,和npm 升级,降级。


 

npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.

npm ERR! code ETARGET

npm ERR! notarget No matching version found for @babel/code-frame@^7.5.5.

npm ERR! notarget In most cases you or one of your dependencies are requesting

npm ERR! notarget a package version that doesn't exist.

npm ERR! notarget

npm ERR! notarget It was specified as a dependency of '@babel/core'

npm ERR! notarget



npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\jimiStephen\AppData\Roaming\npm-cache\_logs\2020-02-05T08_17_48_310Z-debug.log

出现上面的提示,要执行npm update 对引用的包进行更新;如果没有找到相应的安装包,要使用 npm install XXX 进行安装。

npm ERR! code EINTEGRITY

npm ERR! Verification failed while extracting [email protected]:
npm ERR! sha1-zdTETTqiZOrC9o7BZbx5HDSvEjI= integrity checksum failed when using sha1: wanted sha1-zdTETTqiZOrC9o7BZbx5HDSvEjI= but got sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== sha1-5oowx8sET

i+zYrQoRp/rKRwuCdg=. (10700 bytes)

解决方案:
https://stackoverflow.com/questions/47545940/when-i-run-npm-install-it-returns-with-err-code-eintegrity-npm-5-3-0

你可能感兴趣的:(IT)