Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 12 installed but getting Autoprefixer doesn’t support Node v8.10.0. Update it. #189

Closed
samstickland opened this issue Sep 21, 2020 · 9 comments

Comments

@samstickland
Copy link

Firstly, thanks for continuing to maintain this gem! Sorry to be here with a issue :(

I just started receiving this message recently on our Codeship builds, which is very odd, because we didn't change anything that I know of.

$ node -v
v12.16.3
$ ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]

Not sure where it's finding 8.10.0 from - any ideas how I can hunt this down? We aren't using Ruby Racer.

@samstickland
Copy link
Author

Ah, I found some more information. The above was with 10.0.0.2, but regressing to 9.8.6.5 'fixes' the issue.

@samstickland
Copy link
Author

And I should add that Codeship run Ubuntu AFAIK. The node version detection was working correctly on my Mac.

@mountaindog
Copy link

I ran into the same issue. Pushed an update to Codeship and it failed with the same error message. The only changes were a bundle update, that updated Autoprefixer to 10.x Yes, downgrading / rolling-back to 9.8.6.5 temporarily "fixes" the issue.

@joesiewert
Copy link

Maybe related to the changes in #182?

@albb0920
Copy link
Collaborator

albb0920 commented Sep 21, 2020

v9 to v10 is a major version change, which drops support for EOL-ed node versions, including 8.x

There’s definitely 8.10.0 installed somewhere in the image, probably system package.

Please try which node in their debug shell, and see if it’s inside your $PATH in your CI script.

The laziest solution might be switching to mini_racer by adding it to your Gemfile.

I’ll see if I can provide more help on upgrading nodejs in this particular environment.

Thanks

@mountaindog
Copy link

FYI - I set up Travis CI and it returned the same error msg - Autoprefixer doesn’t support Node v8.10.0. Let me know if you would like more details on the setup.

@albb0920
Copy link
Collaborator

For Codeship, this is due to the current released version of execjs prefers nodejs command if exists over node, nvm only handles node while Ubuntu packages nodejs as nodejs.

Adding this line in your setup commands should fix this.

ln -s $(which node) ~/bin/nodejs

@albb0920
Copy link
Collaborator

For Travis CI, something like this should work:

language: ruby
rvm:
  - 2.6.6
before_install:
  - gem install bundler -v 2.1.4
  - nvm install node
  - bundle
script:
  - bin/rails assets:precompile

I'm closing this as this is more related to the execjs gem and individual environments.
Feel free to further discuss this issue. ;)

@samstickland
Copy link
Author

@albb0920 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants