webstorm 权限不够

我用webstorm 启项目的时候, 报了这个错,大概意思是权限不够, 应该怎么办?
PS: 在win7上正常运行,都没有报错

sh: /home/a/Dev/xcEdu/xcEduUI01/xc-ui-pc-sysmanage/node_modules/.bin/webpack-dev-server: 权限不够
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! xc-ui-pc-sysmanage@1.0.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the xc-ui-pc-sysmanage@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!     /home/a/.npm/_logs/2020-04-22T01_20_33_937Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! xc-ui-pc-sysmanage@1.0.0 start: `npm run dev`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the xc-ui-pc-sysmanage@1.0.0 start 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!     /home/a/.npm/_logs/2020-04-22T01_20_33_948Z-debug.log

我在命令前添加了sudo , 报错

sudo: webpack-dev-server:找不到命令
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xc-ui-pc-sysmanage@1.0.0 dev: `sudo webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the xc-ui-pc-sysmanage@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!     /home/a/.npm/_logs/2020-04-22T01_33_26_017Z-debug.log

可能的原因:
1.用的是sudo npm install,所以文件权限不对。ls -al看看权限。解决方法,sudo chmod 755 -R node_modules/
2.你的node_modules可能是从windows里面拷过来的。解决方法,删了node_modules重新npm install。
有这么个帖子,你可以看看:

Forum kindly sponsored by