【问题标题】:node-gyp error while depoloying rails 6 with vue app on heroku在heroku上使用vue应用程序部署rails 6时出现node-gyp错误
【发布时间】:2020-10-12 03:36:32
【问题描述】:

我正在尝试在 heroku 上使用 vue 应用程序部署 rails 6,但出现此错误:

[4/4] Building fresh packages...
   error /tmp/build_c242c7d78580af478535f5a344ff701e/node_modules/fibers: Command failed.
   Exit code: 127
   Command: node build.js || nodejs build.js
   Arguments: 
   Directory: /tmp/build_c242c7d78580af478535f5a344ff701e/node_modules/fibers
   Output:
   node-gyp not found! Please ensure node-gyp is in your PATH--
   Try running: `sudo npm install -g node-gyp`
   /bin/sh: 1: nodejs: not found
   spawn node-gyp ENOENT
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

   Precompiling assets failed.

   Push rejected, failed to compile Ruby app.
   Push failed

我试图到处寻找解决方案,但似乎没有其他人遇到过这个问题。知道如何解决这个问题吗?谢谢

【问题讨论】:

    标签: javascript ruby-on-rails vue.js heroku yarnpkg


    【解决方案1】:

    我没有将 node buildpack 添加到 heroku 应用程序,添加它解决了问题

    【讨论】:

    • 除此之外我必须在heroku/rails buildpack 之前移动它
    猜你喜欢
    • 2018-09-10
    • 1970-01-01
    • 2021-03-25
    • 1970-01-01
    • 1970-01-01
    • 2019-04-07
    • 2018-05-30
    • 1970-01-01
    • 2020-05-07
    相关资源
    最近更新 更多