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

Lock execjs to 2.7.0 #2568

Merged
merged 5 commits into from Feb 19, 2023
Merged

Conversation

henrique-ft
Copy link

This PR solves the problem of #2564

Many people having this problem did the same, it is a execjs issue: rails/execjs#99

[2022-09-11 13:53:52] ERROR ExecJS::ProgramError: TypeError: Cannot read properties of undefined (reading 'version')
	eval (eval at <anonymous> ((execjs):1:213), <anonymous>:1:10)
	(execjs):1:213
	(execjs):19:14
	(execjs):1:40
	Object.<anonymous> ((execjs):1:58)
	Module._compile (node:internal/modules/cjs/loader:1120:14)
	Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
	Module.load (node:internal/modules/cjs/loader:998:32)
	Module._load (node:internal/modules/cjs/loader:839:12)
	Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:39:in `exec'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:21:in `eval'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/execjs-2.8.1/lib/execjs/runtime.rb:64:in `eval'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/autoprefixer-rails-9.8.6.5/lib/autoprefixer-rails/processor.rb:170:in `runtime'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/autoprefixer-rails-9.8.6.5/lib/autoprefixer-rails/processor.rb:53:in `process'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/middleman-autoprefixer-2.10.1/lib/middleman-autoprefixer/extension.rb:83:in `prefix'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/middleman-autoprefixer-2.10.1/lib/middleman-autoprefixer/extension.rb:74:in `process'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/middleman-autoprefixer-2.10.1/lib/middleman-autoprefixer/extension.rb:60:in `call'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rack-2.2.4/lib/rack/lint.rb:50:in `_call'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rack-2.2.4/lib/rack/lint.rb:38:in `call'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rack-2.2.4/lib/rack/builder.rb:244:in `call'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rack-2.2.4/lib/rack/handler/webrick.rb:95:in `service'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb:140:in `service'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb:96:in `run'
	/home/HENRIQUE.TEIXEIRA/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/webrick-1.7.0/lib/webrick/server.rb:310:in `block in start_thread'

@henrique-ft
Copy link
Author

It still dont work in 2.8.1

@tnir
Copy link
Contributor

tnir commented Sep 13, 2022

@henrique-ft It looks like you need to do bundle && git add Gemfile.lock && git commit --amend to pass the CI pipeline.

Copy link
Contributor

@tnir tnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should modify

s.add_dependency('execjs', ['~> 2'])
instead.

Gemfile Outdated
@@ -41,4 +41,7 @@ gem 'simplecov', '~> 0.21', require: false
gem 'middleman-cli', path: 'middleman-cli'
gem 'middleman-core', path: 'middleman-core'

# Locked in 2.7.0 until https://github.com/rails/execjs/issues/99 be solved (still dont work in 2.8.1)
gem 'execjs', '2.7.0'
Copy link
Member

@markets markets Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @henrique-ft 👋🏼

This is not necessary anymore ✂️, as it was already defined in the gemspec now

@stale
Copy link

stale bot commented Jan 2, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 2, 2023
@tdreyno tdreyno added notstale and removed stale labels Jan 2, 2023
@tdreyno tdreyno merged commit 5e6daa9 into middleman:master Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants