简体   繁体   中英

node-gyp error while depoloying rails 6 with vue app on heroku

I'm trying to deploy rails 6 with vue app on heroku, but I'm getting this error:

[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

I tried to search for solution everywhere, but it seems like no one else had this problem. Any idea how to fix this? Thanks

I didn't add node buildpack to heroku app, adding it fixed the problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM