项目需要在本地运行了一个Vue项目,但部署到远程Linux服务器就一直报各种错误。

错误代码

Error: spawn EACCES
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn (child_process.js:502:9)
    at module.exports (/chroot/www/vueDemo/settle-webapp/node_modules/opn/index.js:74:26)
    at devMiddleware.waitUntilValid (/chroot/www/vueDemo/settle-webapp/build/dev-server.js:80:5)
    at continueBecauseBundleAvailable (/chroot/www/vueDemo/settle-webapp/node_modules/webpack-dev-middleware/lib/Shared.js:139:6)
    at Array.forEach (<anonymous>)
    at /chroot/www/vueDemo/settle-webapp/node_modules/webpack-dev-middleware/lib/Shared.js:138:9
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nobodyshop-webapp@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nobodyshop-webapp@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-12-03T07_26_31_878Z-debug.log

解决方法

以上错误主要是由于没有足够的权限导致,将相关目录设置为777即可正常运行。

Logo

前往低代码交流专区

更多推荐