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

H5模式下执行yarn dev:h5报错 #6688

Closed
yuy1guo opened this issue Jun 16, 2020 · 4 comments · Fixed by #6707
Closed

H5模式下执行yarn dev:h5报错 #6688

yuy1guo opened this issue Jun 16, 2020 · 4 comments · Fixed by #6707
Assignees

Comments

@yuy1guo
Copy link

yuy1guo commented Jun 16, 2020

问题描述

复现步骤

通过taro init myApp执行了初始化,
选择了ts、sass、redux模板,
然后执行yarn dev:h5就报错了

报错信息

$ npm run build:h5 -- --watch

myApp@1.0.0 build:h5 D:\dtan\myApp
taro build --type h5 "--watch"

�👽 Taro v2.2

创建 发现文件 src\app.scss
创建 发现文件 src\app.tsx
创建 发现文件 src\index.html
创建 发现文件 src\actions\counter.ts
创建 发现文件 src\constants\counter.ts
创建 发现文件 src\reducers\counter.ts
创建 发现文件 src\reducers\index.ts
创建 发现文件 src\store\index.ts
创建 发现文件 src\pages\index\index.scss
创建 发现文件 src\pages\index\index.tsx
(node:7912) UnhandledPromiseRejectionWarning: Error: Cannot find module 'uglifyjs-webpack-plugin'
Require stack:

  • D:\dtan\myApp\node_modules@tarojs\webpack-runner\dist\util\chain.js
  • D:\dtan\myApp\node_modules@tarojs\webpack-runner\dist\config\dev.conf.js
  • D:\dtan\myApp\node_modules@tarojs\webpack-runner\dist\index.js
  • D:\dtan\myApp\node_modules@tarojs\webpack-runner\index.js
  • C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules_@tarojs_helper@2.2.8@@tarojs\helper\dist\npm.js
  • C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules_@tarojs_helper@2.2.8@@tarojs\helper\dist\index.js
  • C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules_@tarojs_helper@2.2.8@@tarojs\helper\index.js
  • C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\dist\util\index.js
  • C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\bin\taro
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object. (D:\dtan\myApp\node_modules@tarojs\webpack-runner\dist\util\chain.js:11:24)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Module._compile (C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules_pirates@4.0.1@pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Object.newLoader [as .js] (C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules_pirates@4.0.1@pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object. (D:\dtan\myApp\node_modules@tarojs\webpack-runner\dist\config\dev.conf.js:6:17)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Module._compile (C:\Users\39486\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules_pirates@4.0.1@pirates\lib\index.js:99:24)
    (node:7912) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
    (node:7912) [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.
    Done in 9.93s.

系统信息

�👽 Taro v2.2.8

Taro CLI 2.2.8 environment info:
System:
OS: Windows 10
Binaries:
Node: 12.16.1 - D:\ProgramFiles\NodeJs\node.EXE
Yarn: 1.22.4 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.13.4 - D:\ProgramFiles\NodeJs\npm.CMD

@Zigei
Copy link

Zigei commented Jun 16, 2020

问题 +1

@yuy1guo
Copy link
Author

yuy1guo commented Jun 16, 2020

问题 +1

我感觉今天taro有毛病啊

@Zigei
Copy link

Zigei commented Jun 16, 2020

问题 +1

我感觉今天taro有毛病啊

太秃然了 本来想着很久没升级了 该升级了 结果一升级崩了

@dreamthen
Copy link

问题 +1

我感觉今天taro有毛病啊

太秃然了 本来想着很久没升级了 该升级了 结果一升级崩了

直接回退吧,2.2.8有毒

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

Successfully merging a pull request may close this issue.

4 participants