compiler.hooks.done.tap('done', async stats => {,可能是node的原因,但不知道怎么解决

来源:3-5 菜单组件开发(1)

oOOPython

2020-02-14

老师,你好。

E:eactimoocmanagerfirst>yarn start
yarn run v1.21.1
$ node scripts/start.js
E:
eactimoocmanagerfirst
ode_modules
eact-dev-utilsWebpackDevServerUtils.js:167
compiler.hooks.done.tap(‘done’, async stats => {
^^^^^

SyntaxError: missing ) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (E:
eactimoocmanagerfirstscriptsstart.js:29:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我之前在mac上正常运行,把项目直接放到window7虚拟机上,确始终报这个错误。
我尝试了很多版本的node都不能解决,求老师慷慨解囊。
node版本

出错

写回答

1回答

河畔一角

2020-02-14

我擦,看不懂这个错误。你是说同样的代码在mac正常,放到虚拟机就报错吗?

0
2
河畔一角
把node换成12,然后用cnpm运行看下,这个目前我还不怎么看懂,先碰碰运气,换个高版本。
2020-02-14
共2条回复

React全家桶+AntD共享单车后台管理系统开发

React全家桶+AntD框架+大量前沿技术

1142 学习 · 495 问题

查看课程