Alisa510
Alisa510
  • 发布:2021-04-10 23:02
  • 更新:2022-03-08 11:22
  • 阅读:2822

项目编译时uni-cli-shared\lib\util.js文件报错TypeError: path.replace is not a function

分类:uni-app

项目编译时uni-cli-shared\lib\util.js文件中const normalizePath = path => (isWin ? path.replace(/\/g, '/') : path)报错TypeError: path.replace is not a function

具体报错:
22:57:00.019 E:\GitLab\yunfu\estate-parent\app\node_modules\@dcloudio\uni-cli-shared\lib\util.js:7
22:57:00.020 const normalizePath = path => (isWin ? path.replace(/\/g, '/') : path)
22:57:00.064 ^
22:57:00.065 TypeError: path.replace is not a function
22:57:00.077 at normalizePath (E:\GitLab\yunfu\estate-parent\app\node_modules\@dcloudio\uni-cli-shared\lib\util.js:7:45)
22:57:00.079 at ErrorReport.report (E:\GitLab\yunfu\estate-parent\app\node_modules\@dcloudio\vue-cli-plugin-uni\lib\error-reporting.js:44:11)
22:57:00.094 at report (E:\GitLab\yunfu\estate-parent\app\node_modules\@dcloudio\vue-cli-plugin-uni\lib\error-reporting.js:144:24)
22:57:00.096 at process.<anonymous> (E:\GitLab\yunfu\estate-parent\app\node_modules\@dcloudio\vue-cli-plugin-uni\lib\error-reporting.js:154:42)
22:57:00.114 at process.emit (events.js:314:20)
22:57:00.115 at process._fatalException (internal/process/execution.js:165:25)

2021-04-10 23:02 负责人:无 分享
已邀请:
Alisa510

Alisa510 (作者) - fighting

麻烦大佬们看一下怎么解决,在线等,先谢谢啦

H***@163.com

H***@163.com

解决了吗

shaoyv88

shaoyv88

遇到同样的错误,解决了么

飞奔的兔子

飞奔的兔子 - 保护头发,多喝热水

同问

DCloud_uni-ad_HDX

DCloud_uni-ad_HDX

更新版本,已修复

1***@qq.com

1***@qq.com

删了 重新 npm install

OpenfaceSY

OpenfaceSY

求问 该怎么办?已经更新了node,还是没用。

Ianironman

Ianironman

遇到同样的问题,有解决的吗?

该问题目前已经被锁定, 无法添加新回复