解决 This is probably not a problem with npm. There is likely additional logging output above.

简介: 解决 This is probably not a problem with npm. There is likely additional logging output above.
  • 在执行 npm run serve 运行项目的时候报错:
dengzemiaodeMacBook-Pro:lianshan_vue dengzemiao$ npm run serve
......
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lianshan@2.0.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lianshan@2.0.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dengzemiao/.npm/_logs/2021-01-14T06_10_01_084Z-debug.log
  • 如果出现这种报错情况,需要重新安装 node_modules 文件夹中的内容 但是在安装前,要把之前的内容都清空掉。
  • 其实大多数的主要问题是 package-lock.json 这个文件,一般使用 1、2、4 步就够了,如果不行在重新 1、2、3、4 步,因为使用了 第3步,在 $ npm install 安装会要点时间,相对较慢。
  • 步骤如下:
    1、首先删除 node_modules,可以命令行删除,也可以手动右键删除文件夹。
$ rmdir /s/q node_modules
  • 2、删除 package-lock.json 文件
    3、运行命令
$ npm cache clean --force
  • 4、重新加载
$ npm install
相关文章
ERROR: No matching distribution found for gradio>=3.23
该博客文章提供了解决使用pip安装gradio版本3.23时出现的"No matching distribution found"错误的步骤,包括从官网下载相应的whl文件并手动安装。
ERROR: No matching distribution found for gradio>=3.23
|
4月前
|
数据库 开发工具 开发者
【Python】已解决:You have 18 unapplied migration(s). Your project may not work properly until you apply t
【Python】已解决:You have 18 unapplied migration(s). Your project may not work properly until you apply t
171 0
|
6月前
|
JavaScript
Parsing error: No Babel config file detected for 。。
Parsing error: No Babel config file detected for 。。
155 3
kali2022.1The following packages were automatically installed and are no longer required
kali2022.1The following packages were automatically installed and are no longer required
87 1
|
6月前
|
JavaScript
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
|
6月前
|
资源调度
Yarn install 报错 Resolving packages... [2/4] Fetching packages... info There appears to be trouble wi
Yarn install 报错 Resolving packages... [2/4] Fetching packages... info There appears to be trouble wi
398 0
|
Python
Python安装库Could not find a version that satisfies the requirement requests (from versions: none)
Python安装库Could not find a version that satisfies the requirement requests (from versions: none)
132 1
|
11月前
Error: Plugin/Preset files are not allowed to export objects, only functions……
Error: Plugin/Preset files are not allowed to export objects, only functions……
|
网络安全 Python
pip is configured with locations that require TLSSSL
pip is configured with locations that require TLS/SSL
93 0
configure: error: Library requirements (libpcre >= 7.8) not met
configure: error: Library requirements (libpcre >= 7.8) not met
138 0