1***@qq.com
1***@qq.com
  • 发布:2019-10-09 14:31
  • 更新:2020-04-13 18:36
  • 阅读:4096

HBuderX新建element-starter的项目,使用npm run dev运行时报错

分类:HBuilderX

报错内容如下:

D:\A_学习文件\textElement\node_modules\webpack-dev-server\node_modules\spdy\node_modules\debug\src\node.js:132
let val = process.env[key];
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (D:\A_学习文件\textElement\node_modules\webpack-dev-server\node_modules\spdy\node_modules\debu
g\src\index.js:9:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run
" "dev"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! element-starter@1.0.0 dev: webpack-dev-server --inline --hot --env.dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the element-starter@1.0.0 dev script 'webpack-dev-server --inline --hot --env.dev'.
npm ERR! This is most likely a problem with the element-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --hot --env.dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs element-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls element-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\A_学习文件\textElement\npm-debug.log

2019-10-09 14:31 负责人:无 分享
已邀请:
DCloud_HB_WDL

DCloud_HB_WDL

打开命令行,进入此项目下,执行npm install 试试

DCloud_HB_WKP

DCloud_HB_WKP

升一下你的node版本

2***@qq.com

2***@qq.com

麻烦问下如何解决的啊?

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