Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install完之后,启动H5,报错(node:3732) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'uglify' of undefined #43

Open
enjoyWeb opened this issue Jul 17, 2019 · 2 comments

Comments

@enjoyWeb
Copy link

问题描述
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]

补充信息

@enjoyWeb
Copy link
Author

npm run dev:weapp就启动正常

@canfoo
Copy link

canfoo commented Aug 9, 2019

应该是全局taro版本和项目用的taro版本不一致导致的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants