我在这里遇到一个奇怪的问题,当我尝试使用npm install时,我的git-bash和我的终端我将这个错误my error message
有人告诉我清除缓存,我这样做了,只是情况变了,现在我没有安装任何错误消息,提示安装过程从未完成,所以我做了类似的事情 the second error message
答案 0 :(得分:1)
第1步:从您的项目中删除<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true">
<targets>
<target xsi:type="File" name="fileLogger"
concurrentWrites="true"
fileName="d:\log\test.txt"
layout="${longdate} | ${machinename} | ${logger} | ${uppercase:${level}} | ${message}" />
</targets>
<rules>
<logger name="logger1" minlevel="Trace" writeTo="fileLogger" />
</rules>
</nlog>
文件
第2步:如果您的npm版本为5或更高版本。然后运行以下命令
package-lock.json
第3步:然后运行包裹包裹
npm cache verify
或
npm install -g parcel-bundler
希望它应该能工作。
答案 1 :(得分:1)
如果它发生在我的工作中,我会使用提升的权限打开 VS Code。它有助于安装 npm。
答案 2 :(得分:0)
将npm降级到v4.6.1。
npm install npm@4
版本> = 5不稳定。
答案 3 :(得分:0)
当我尝试在全球范围内安装prisma时出现此错误,我解决了此问题
1> npm cache clear --force
2> npm install npm
答案 4 :(得分:0)
我也遇到了同样的问题(“ https://registry.npmjs.org/的意外警告:其他警告ETIMEDOUT:对https://registry.npmjs.org/@angular%2fcli的请求失败,原因:连接ETIMEDOUT 104.16.22.35:443”)
解决方案:
第1步:从您的项目中删除package-lock.json文件
第2步:如果您的npm版本为5或更高版本。然后运行以下命令
npm缓存验证
第3步:然后运行包裹包裹
npm install -g包裹捆绑机
然后最后,它显示了“网络连接”问题... !!!
答案 5 :(得分:0)
如果以上答案没有帮助,请尝试运行 sudo npm install
。
有时你只是没有写的权限。
答案 6 :(得分:0)
提供的解决方案 here 对我有用。
rm ./package-lock.json
rm -r ./node_modules
npm cache clear --force
您可能还想检查您的互联网连接是否速度较慢。
答案 7 :(得分:-1)
第1步:尝试先使用清除缓存
npm cache clear --force
第2步:尝试重新安装
npm install -g @angular/cli