在执行 npm install 时出现“没有打开此类文件或目录"的错误; [英] While doing npm install getting an error as "No such file or directory open"

查看:236
本文介绍了在执行 npm install 时出现“没有打开此类文件或目录"的错误;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

npm WARN tar ENOENT: 没有那个文件或目录,打开'C:{{File_Location}}\node_modules.staging\mocha-20835964\lib\browser\progress.js'

npm WARN tar ENOENT: no such file or directory, open 'C:{{File_Location}}\node_modules.staging\mocha-20835964\lib\browser\progress.js'

和错误消息为 npm ERR!解析 '...int-stylish":"~0.1.3"' 附近时 JSON 输入意外结束

and Error message as npm ERR! Unexpected end of JSON input while parsing near '...int-stylish":"~0.1.3"'

我在上面的 Visual Studio 中尝试命令 npm-install 是我得到的错误.请帮助我.

I am trying the command npm-install in visual studio above is the error which I am getting.Please help me for the same.

推荐答案

先删除 package-lock.json.导航到项目的根文件夹和 npm cache clean --force,然后尝试 npm install

delete package-lock.json first. navigate to the root folder of your project and npm cache clean --force, then try npm install

这篇关于在执行 npm install 时出现“没有打开此类文件或目录"的错误;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆