npm报错问题怎么解决


本篇内容主要讲解“npm报错问题怎么解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“npm报错问题怎么解决”吧!问题描述:错误信息: unbuild: sill gentlyRm target.inParent = false后续会出现长时间停留问题解决:删除整个node_modules,重新npm install问题描述:这个是因为版本问题导致的提示信息。错误信息:npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile问题解决:忽略它。这只是一个警告,所发生的npm只是向package-lock.json文件添加信息。npm在生产中降级到旧版本。考虑运行npm版本 6,npm i npm@6 -g 或者 npm -g install npm@6如果已经安装了一个新版本的npm,要保留较新版本,使用旧版本运行一个npm命令,可以使用npx来执行。使用该-p标志来指定npm想要的版本。例如,即使安装了版本 7 ,运行npx -p npm@6 npm ci,也会使npm ci以npm版本 6运行。问题描述:这是因为在git bash here,vs code等第三方,不以管理员身份运行造成的问题,就根本来说git bash here是windows dos命令封装过的。但是cmd 以管理员身份运行就需要定位到相应文件夹操作(需要先进入相应盘,再进入相应文件,比较麻烦 ),但是从第三方进入就可以直接在相应文件夹下操作,这样也比较方便。错误信息:$ npm install
npm WARN tarball tarball data for typescript@3.0.3 (sha1-SFOz4nXs2qJ/eP2kbcJzp+t
/wcg=) seems to be corrupted. Trying one more time免费云主机域名.
npm ERR! path E:vue-typescriptnode_modules.stagingtypescript-10ba8b53libty
pescriptServices.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink ‘E:vue-typescriptnode_m
odules.stagingtypescript-10ba8b53libtypescriptServices.js’
npm ERR! { Error: EPERM: operation not permitted, unlink ‘E:vue-typescriptnod
e_modules.stagingtypescript-10ba8b53libtypescriptServices.js’
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink ‘E:vue-typescriptn
ode_modules.stagingtypescript-10ba8b53libtypescriptServices.js’
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘E:vue-typescriptnode_modules.stagingtypescript-10ba
8b53libtypescriptServices.js’ },
npm ERR! stack: ‘Error: EPERM: operation not permitted, unlink ‘E:vue-types
criptnode_modules.stagingtypescript-10ba8b53libtypescriptServices.js’
‘,
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘unlink’,
npm ERR! path: ‘E:vue-typescriptnode_modules.stagingtypescript-10ba8b5
3libtypescriptServices.js’,
npm ERR! parent: ‘hello-world’ }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It’s possible that the file was already in use (by a text editor or ant
ivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check t
he
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended
).问题解决:需要删除.npmrc文件强调:不是nodejs安装目录npm模块下的那个npmrc文件而是在C:Users{账户}下的.npmrc文件eg: 我的是C:Userszhuzhu,下面有一个.npmrc问题描述:npm ERR! code EEXISTnpm ERR! File exists: E:softwarenode.jsnode_globalvue
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with –force to overwrite files recklessly.如提示,加入–force强制执行问题解决:清理缓存
npm cache clean –force 或者清理node_cache缓存重新执行全局安装或者强制执行
npm install @vue/cli -g或者npm install -g @vue/cli –force首先通过npm安装删除工具安装淘宝镜像后可以使用在使用删除命令这个删除本项目的node_modules文件可以试试删除整个项目的直接找到安装目录,把他移到回收站到此,相信大家对“npm报错问题怎么解决”有了更深的了解,不妨来实际操作一番吧!这里是百云主机网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

相关推荐: C++中运算符和表达式的示例分析

小编给大家分享一下C++中运算符和表达式的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!在编程语言中“表达式”可以近似于“公式”,也就是按照自己的预期进行某种计算,表达式由运…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 01/20 13:12
下一篇 01/20 13:17

相关推荐