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
TypeError: Cannot read property 'version' of undefined #203
Comments
This is a long known problem (see #160), then master branch, now released version of execjs decided to undefine Sine execjs 2.7.0 served us very well for 5 years without any major problem, I'll release a patch to lock to 2.7 until we figure out a way to deal with this. Thanks for reporting! |
Well, actually it's partly broken on Ruby 3.0, hence why a 2.8.0 was released. May I ask why the need to check the node version? |
Ok, self answer: autoprefixer-rails/lib/autoprefixer-rails/processor.rb Lines 134 to 141 in 73ad716
It is to eagerly error out. IMHO, I feel like this pre-check could be removed, and then a message could be appended if an actual error happen? Or maybe there's some kind of feature testing that could be done instead of a version check? |
Indeed, we don't absolutely need that version check, I'll have to change this quite a bit to ensure we can provide a good enough error though. It is quite common for execjs to locate a nodejs binary not expected by the user, eg #189. (especially on ubuntu), so simply suggesting the user to check their node version is likely insufficient. I'll try to address this properly in a few days, meanwhile 10.2.5.0 was released to lock with execjs 2.7.0 Thanks |
- The error occurs that is because of execjs has been changed `process to `this.process`. - Fix ai#203
- The error occurs that is because execjs has been changed `process` to `this.process`. - Fix ai#203
- The error occurs that is because process of execjs has been removed from rails/execjs@b0be19c - to fix it, use shell script instead of execjs eval - Fix ai#203
Version 10.2.5.1 is now released, which is compatible with execjs 2.8.1, sorry for the delay |
….8.1. For details, see: ai/autoprefixer-rails#203
….8.1. (#796) For details, see: ai/autoprefixer-rails#203
Just wanted to try
autoprefixer-rails
(latest) on a MacBook Air M1 running Node v14.16.1 for a Rails 6.1.3.2/Ruby 3.0.1 project that could use some browser-prefixes in apdf.css
file and got the following error:Apparently
process
ofis undefined.
Bundling
execjs
to version2.7.0
fixes this problem, so there seem to be some breaking changes in the newly released (first release after almost five years)execjs
version2.8.0
.The text was updated successfully, but these errors were encountered: