【问题标题】:NPM scripts permission denied on chronos (chromebook shell)chronos (chromebook shell) 上的 NPM 脚本权限被拒绝
【发布时间】:2017-09-27 00:59:49
【问题描述】:

我最近在我的 chromebook 上安装了节点。我已经 git 克隆了一个基本节点 repo,它试图运行 webpack、babel-node 之类的东西,并通过 npm 脚本同时运行。

但是,运行 webpack(在同一目录中)就可以了。

我已经运行了“sudo chmod -R 777 my_app”,但没有帮助。

这是错误信息:

chronos@localhost ~/Downloads/MODULE $ npm start

> my-glitch-app@0.0.1 start /home/chronos/user/Downloads/MODULE
> concurrently "webpack -w -p" "babel-node server.js"

sh: concurrently: Permission denied

npm ERR! Linux 3.18.0-14875-g438cb8ab27c6
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! my-glitch-app@0.0.1 start: `concurrently "webpack -w -p" "babel-node server.js"`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the my-glitch-app@0.0.1 start script 'concurrently "webpack -w -p" "babel-node server.js"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the my-glitch-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrently "webpack -w -p" "babel-node server.js"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs my-glitch-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls my-glitch-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/chronos/user/Downloads/MODULE/npm-debug.log

【问题讨论】:

  • 谁是文件的所有者 (ls -l)?您可能需要 chown 给您的用户。
  • 我做了 whoami,上面写着“chronos”,每个文件都写着“drwxr-xr-x。3 chronos chronos 4096 Sep 26 20:42 file/folderName”
  • 您能否在原始问题中包含实际错误?
  • @Svenskunganka 我添加了错误消息
  • 谢谢。问题很可能与concurrently 工具有关,您应该可以在node_modules/.bin/concurrently 中找到该工具。检查其所有权和文件权限。如果您已全局安装包(npm install -gnpm install --global),它将位于您配置 npm 以存储全局安装包的位置的 bin 目录下。

标签: javascript node.js linux npm chromebook


【解决方案1】:

根据我上面的评论,sudo mount -o remount,exec /home/chronos/user 似乎有效,但我的情况还有其他异常情况,所以我对同行体验感到好奇

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-20
    • 1970-01-01
    • 2014-06-18
    • 2015-11-15
    • 1970-01-01
    • 2019-09-24
    相关资源
    最近更新 更多