问题描述
install完之后,启动H5,报错
复现步骤
[复现问题的步骤]
1、npm install
2、npm run dev:h5
无
期望行为
npm run dev:h5启动成功
报错信息
(node:3732) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'uglify' of undefined
at Object.default_1 [as default] (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\config\dll.conf.js:20:38)
at Promise (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:43:48)
at new Promise ()
at Object. (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:42:12)
at Generator.next ()
at F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:7:71
at new Promise ()
at __awaiter (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:3:12)
at buildDll (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:39:30)
at Object. (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:127:15)
at Generator.next ()
at F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:7:71
at new Promise ()
at __awaiter (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:3:12)
at exports.default (F:\www\taro-msparis\node_modules@tarojs\webpack-runner\dist\index.js:122:31)
at Compiler. (C:\Users\ThinkPad\AppData\Local\Yarn\Data\global\node_modules@tarojs\cli\dist\h5\index.js:153:13)
at Generator.next ()
at fulfilled (C:\Users\ThinkPad\AppData\Local\Yarn\Data\global\node_modules@tarojs\cli\dist\h5\index.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:3732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3732) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
系统信息
- 操作系统: [e.g. Windows 10]
- Taro 版本 [e.g. v1.3.0]
- Node.js 版本 [e.g. v10.16.0]
- 报错平台 [h5]
补充信息
应该是全局taro版本和项目用的taro版本不一致导致的。