0

Having problems when trying to push my Rails 5.1 app to Heroku. rake:assets:precompile fails with

Webpacker requires Node.js >= 6.0.0 and you are using 0.10.30

I've posted before on this but haven't been able to resolve it, and am now going round in circles. I'm told it looks like an issue with my $PATH and I need to make sure that /usr/local/bin is in my $PATH. It looks like it is. I can also run node and print from the console. I can also see the version of node I'm running, so I'm now at a loss. One thing that does look obviously wrong, is that amount of 'stuff' in the $PATH. Could this be causing the issue?

Simons-MBP:~ Simon$ echo $PATH
/Users/Simon/.rvm/gems/ruby-2.4.0/bin:/Users/Simon/.rvm/gems/ruby-2.4.0@global/bin:/Users/Simon/.rvm/rubies/ruby-2.4.0/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/Simon/.rvm/bin
Simons-MBP:~ Simon$ node
> console.log('hello node')
hello node
undefined
> 
(To exit, press ^C again or type .exit)
> 
Simons-MBP:~ Simon$ node -v
v8.9.4
Simon Cooper
  • 1,574
  • 4
  • 24
  • 53

1 Answers1

1

I don't believe the error is because of your local version of Node, but the Node version on Heroku. See how to specify your Node Engine on Heroku's blog

If that doesn't work, you may need to specify a Buildpack(one compatible with both Ruby & Node), however, I believe you may only need to specify the engine.

oreoluwa
  • 5,553
  • 2
  • 20
  • 27