将node_modules包删除后,重新npm insatll 重新运行,控制面板出现如下错误:
主要错误:const normalizePath = path => (isWin ? path.replace(/\/g, '/') : path)23:35:16.555 F:collegeProjectcollege-projectnode_modules@dcloudiouni-cli-sharedlibutil.js:7
23:35:16.556 const normalizePath = path => (isWin ? path.replace(/\/g, '/') : path)
23:35:16.565 ^
23:35:16.566 TypeError: path.replace is not a function
23:35:16.571 at normalizePath (F:collegeProjectcollege-projectnode_modules@dcloudiouni-cli-sharedlibutil.js:7:45)
23:35:16.572 at ErrorReport.report (F:collegeProjectcollege-projectnode_modules@dcloudiovue-cli-plugin-uniliberror-reporting.js:44:11)
23:35:16.577 at report (F:collegeProjectcollege-projectnode_modules@dcloudiovue-cli-plugin-uniliberror-reporting.js:144:24)
23:35:16.581 at process.<anonymous> (F:collegeProjectcollege-projectnode_modules@dcloudiovue-cli-plugin-uniliberror-reporting.js:154:42)
23:35:16.586 at process.emit (events.js:315:20)
23:35:16.590 at process._fatalException (internal/process/execution.js:165:25)
3.问题已解决:
配置文件出现错误,package.json中的需要的插件不对,缺少了部分,
解决方式:找到出错之前的配置,重新下载或者将原来未出错的node_modules包复制过来即可。