【问题标题】:Unable to push to heroku, permissions error无法推送到heroku,权限错误
【发布时间】:2020-10-24 21:31:16
【问题描述】:

我正在尝试推送到 heroku,但在命令 git push heroku master 上出现错误:

remote: ---> Running in 7c242433acde
remote: /root/.nvm/versions/node/v12.18.1/bin/karma -> /root/.nvm/versions/node/v12.18.1/lib/node_modules/karma/bin/karma
remote:
remote: > core-js-pure@3.6.5 postinstall /root/.nvm/versions/node/v12.18.1/lib/node_modules/karma/node_modules/core-js-pure
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote: sh: 1: node: Permission denied
remote: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/karma/node_modules/chokidar/node_modules/fsevents):
remote: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! syscall spawn
remote: npm ERR! file sh
remote: npm ERR! errno ENOENT
remote: npm ERR! core-js-pure@3.6.5 postinstall: node -e "try{require('./postinstall')}catch(e){}"
remote: npm ERR! spawn ENOENT
remote: npm ERR!
remote: npm ERR! Failed at the core-js-pure@3.6.5 postinstall script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /root/.npm/_logs/2020-07-03T17_00_20_442Z-debug.log
remote: The command '/bin/sh -c cd /myapp/ && npm i -g karma && npm i -g karma-cljs-test && npm i -g karma-chrome-launcher && npm i && lein uberjar' returned a non-zero code: 1
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to myapp.
remote:
To https://git.heroku.com/myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp.git'

似乎是安装节点模块的问题。 如何解决这个问题?

【问题讨论】:

    标签: git heroku


    【解决方案1】:

    我使用sudo--unsafe-perm 在本地解决了the same issue npm install

    sudo npm install --unsafe-perm
    

    但不确定如何将其应用于 Heroku。

    【讨论】:

      猜你喜欢
      • 2021-06-29
      • 2016-12-14
      • 1970-01-01
      • 2016-07-23
      相关资源
      最近更新 更多