一、前言
说明: 从git 或者svn 上下载一个新的vue工程,使用npm install安装项目依赖的时候报错,记录一下解决方法;
二、问题描述
错误信息:
npm ERR! Exit handler never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <Issues · npm/cli>
npm ERR! A complete log of this run can be found in: C:\Users\Administrator\AppData\Local\npm-cache\_logs\2024-08-07T07_45_31_060Z-debug-0.log
截图如下:
三、处理办法
-
删除下载好的node_modules
-
删除package-lock.json文件
-
设置可用的npm镜像仓库(自己公司或者公用的) npm config set registry=http:/***:8081/repository/npm/
-
清除npm缓存 npm cache clean --force 或者是 npm cache verify
-
npm installl