今天在跑环境的时候遇到了2个错误,记录在此。
首先报错:Cannot destructure property `compile` of 'undefined' or 'null'.
解决方法:运行 npm install -D webpack-dev-server@3.0.0 ,把webpack降级到3.x。
然后报错:ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'C:\xx\xx\\node_modules\acorn'
npm ERR! enoent This is related to npm not being able to find a file.
解决方法:运行 cnpm install -D webpack-dev-server@3.0.0