解决 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
|
算法框架/工具
成功解决INFO: pip is looking at multiple versions of keras-preprocessing to determine which version is c
成功解决INFO: pip is looking at multiple versions of keras-preprocessing to determine which version is c
|
6月前
|
JavaScript
Parsing error: No Babel config file detected for 。。
Parsing error: No Babel config file detected for 。。
151 3
|
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
380 0
|
6月前
Parsing error: No Babel config file detected for XXXXX
Parsing error: No Babel config file detected for XXXXX
|
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
configure: error: Package requirements (commoncpp 6.2.2) were not met
configure: error: Package requirements (commoncpp 6.2.2) were not met
85 0