When I start deploying to Heroku, my app throws a node-sass: Command failed error when compiling.
I haven't found much info but it seems to be related to the Heroku stack I'm using (20) and the Buildpack script that is run when my app is deployed (the buildpack is heroku/ruby)
The deploy continues and the app seems to deploy just fine (it works as far as I'm concerned), but the error is unsettling
heroku 20 stack
heroku/ruby Buildpack
Node v12.22.10
Rails 6.0.5
Ruby 3.0.4
cut down deploy log:
remote: [4/4] Building fresh packages...
remote: error /tmp/build_855786d6/node_modules/node-sass: Command failed.
remote: Exit code: 1
remote: Command: node scripts/build.js
remote: Arguments:
remote: Directory: /tmp/build_855786d6/node_modules/node-sass
remote: Output:
remote: gyp ERR! build error
remote: gyp ERR! stack Error: `make` failed with exit code: 2
remote: gyp ERR! stack at ChildProcess.onExit (/tmp/build_855786d6/node_modules/node-gyp/lib/build.js:262:23)
remote: gyp ERR! stack at ChildProcess.emit (node:events:390:28)
remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
remote: gyp ERR! System Linux 4.4.0-1104-aws
remote: gyp ERR! command "/tmp/build_855786d6/bin/node" "/tmp/build_855786d6/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
remote: gyp ERR! cwd /tmp/build_855786d6/node_modules/node-sass
remote: gyp ERR! node -v v16.13.1
remote: gyp ERR! node-gyp -v v3.8.0
remote: gyp ERR! not ok
remote: make: Leaving directory '/tmp/build_855786d6/node_modules/node-sass/build'
remote: Build failed with error code: 1
remote: Compiling...
remote: Asset precompilation completed (131.41s)
remote: Cleaning assets
remote: Running: rake assets:clean
remote: -----> Detecting rails configuration
remote:
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> release, web, worker
remote: Default types for buildpack -> console, rake
remote:
remote: -----> Compressing...
remote: Done: 110.7M
remote: -----> Launching...
remote: ! Release command declared: this new release will not be available until the command succeeds.
remote: Released v50
Full deploy log (justpaste.it)