head-img Force's Blog

/node_modules/.bin/apidoc: Permission denied

JavaScript

运行apidoc -i api/ -o doc/报错

sh: /path/node_modules/.bin/apidoc: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! webui@1.0.0 doc: `apidoc -i api/ -o doc/`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the webui@1.0.0 doc 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!     /xxx/.npm/_logs/2022-03-24T06_39_33_870Z-debug.log

解决办法:

chmod 777 node_modules/.bin/apidoc

再次运行:

apidoc -i api/ -o doc/                   

> webui@1.0.0 doc /U xxx
> apidoc -i api/ -o doc/

info: Done.

OK解决

点我评论
打赏本文
二维码


135

文章

14

标签

 访客统计  Update-0927-16:05

 网站信息