报错内容如下:
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
3 个回复
DCloud_HB_WDL
打开命令行,进入此项目下,执行npm install 试试
DCloud_HB_WKP
升一下你的node版本
1***@qq.com (作者)
可以了 谢谢哦
2019-10-09 17:52
1***@qq.com
回复 1***@qq.com: 您这个问题是怎么解决的
2020-07-04 11:35
2***@qq.com
麻烦问下如何解决的啊?