al-folio: libv8-node (16.10.0.0) installation error

Describe the bug Upon forking and then cloning the current version of the repo to my machine, bundle install produces an error, specifically:

An error occurred while installing libv8-node (16.10.0.0), and Bundler cannot
continue.

In Gemfile:
  mini_racer was resolved to 0.6.2, which depends on
    libv8-node

To Reproduce I followed the instructions in the “Getting Started” guide, under “Local Setup”.

System

  • OS: Windows 10 64-bit
  • Browser: Chrome Version 101.0.4951.67
  • Jekyll version: 4.2.2
  • Ruby version: 3.1.2p20 (2022-04-12 revision 4491bb740a)

Additional context I’m completely new to Jekyll and Ruby, so apologies if I’m missing something obvious.

Below I paste the full output. This was after the second time I ran bundle install

$ bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies....
Using bundler 2.3.14
Using concurrent-ruby 1.1.10
Using minitest 5.15.0
Using public_suffix 4.0.7
Using latex-decode 0.3.2
Using namae 1.1.1
Using rexml 3.2.5
Using colorator 1.1.0
Using crass 1.0.6
Using cssminify2 2.0.1
Using eventmachine 1.2.7
Using http_parser.rb 0.8.0
Using execjs 2.8.1
Using racc 1.6.0
Using sax-machine 1.3.2
Using ffi 1.15.5 (x64-mingw-ucrt)
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using htmlcompressor 0.4.0
Using mime-types-data 3.2022.0105
Using multi_xml 0.6.0
Using rb-fsevent 0.11.1
Using liquid 4.0.3
Using mercenary 0.4.0
Using rouge 3.28.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.8.0
Using jekyll-email-protect 1.1.0
Using json 2.6.2
Using jekyll-twitter-plugin 2.1.0
Using unicode_utils 1.4.0
Using webrick 1.7.0
Using i18n 1.10.0
Using tzinfo 2.0.4
Using addressable 2.8.0
Using citeproc 1.0.10
Using csl 1.6.0
Using bibtex-ruby 6.0.0
Using nokogiri 1.13.6 (x64-mingw-ucrt)
Using kramdown 2.4.0
Using em-websocket 0.5.3
Fetching libv8-node 16.10.0.0
Using mime-types 3.4.1
Using sassc 2.4.0
Using rb-inotify 0.10.1
Using pathutil 0.16.2
Using uglifier 4.2.0
Using terminal-table 2.0.0
Using json-minify 0.0.3
Using activesupport 7.0.3
Using citeproc-ruby 1.1.14
Using csl-styles 1.0.1.11
Using loofah 2.18.0
Using httparty 0.20.0
Using kramdown-parser-gfm 1.1.0
Using jekyll-sass-converter 2.2.0
Using listen 3.7.1
Using feedjira 3.2.1
Using html-pipeline 2.14.1
Using jekyll-watch 2.2.1
Using jekyll 4.2.2
Using jekyll-archives 2.2.1
Using jekyll-diagrams 0.10.0
Using jekyll-feed 0.16.0
Using jekyll-imagemagick 1.4.0
Using jekyll-minifier 0.1.10
Using jekyll-paginate-v2 3.0.0
Using jekyll-scholar 7.1.0
Using jekyll-sitemap 1.4.0
Using jekyll-target-blank 2.0.0
Using jemoji 0.12.0
Installing libv8-node 16.10.0.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
C:/myprograms/Ruby31-x64/bin/ruby.exe -I C:/myprograms/Ruby31-x64/lib/ruby/3.1.0
-r ./siteconf20220601-33924-8or4sy.rb extconf.rb
creating Makefile
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/builder.rb:12:in
`build_libv8!': failed to download node 16.10.0 (Libv8::Node::BuilderError)
from
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/location.rb:30:in
`install!'
        from extconf.rb:9:in `<main>'
==== in
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/libexec/download-node

extconf failed, exit code 1

Gem files will remain installed in
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0 for
inspection.
Results logged to
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/libv8-node-16.10.0.0/gem_make.out

  C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
  C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/tempfile.rb:317:in `open'
C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in
`build'
C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in
`build_extension'
C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block
in build_extensions'
  C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in
`build_extensions'
C:/myprograms/Ruby31-x64/lib/ruby/3.1.0/rubygems/installer.rb:853:in
`build_extensions'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/source/rubygems.rb:204:in
`install'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/installer/gem_installer.rb:54:in
`install'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/worker.rb:62:in
`apply_func'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/worker.rb:57:in
`block in process_queue'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/worker.rb:54:in
`loop'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/worker.rb:54:in
`process_queue'
C:/myprograms/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'

An error occurred while installing libv8-node (16.10.0.0), and Bundler cannot
continue.

In Gemfile:
  mini_racer was resolved to 0.6.2, which depends on
    libv8-node

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 30
  • Comments: 40 (1 by maintainers)

Commits related to this issue

Most upvoted comments

I have had the same Issue on Window 10, as many of you suggested I fixed it in the following way:

  • Installing Node.Js
  • Adding gem 'wdm', '~> 0.1.0' on the GemFile => Groups
  • Commented out # gem 'mini_racer'
  • Running jekyll with: $ jekyll serve command

Capture

…and it finally works!I was afraid that the more I tried to solve it, the smarter the problem became!

Capture2

Thank you All for being so Helpful! 🙏

There could be a possible loophole, just disable (comment out) the min_racer or therubyracer plugin. And install Node.js. Then try to build again.

But make sure when committing to the remote, the plugin should not be disabled.

I can successfully run the website locally on my computer. However, for deployment, I face the following error. Note that I’m a windows user and a beginner (thanks for your patience)!

$ bin/deploy --user
Deploying...
Source branch: source
Deploy branch: master
Do you want to proceed? [y/N] y
Switched to branch 'source'
Deleted branch master (was b4306f1).
Switched to a new branch 'master'
Configuration file: C:/Users/Amirhossein/Documents/ahmoosavi.github.io/_config.yml
            Source: C:/Users/Amirhossein/Documents/ahmoosavi.github.io
       Destination: C:/Users/Amirhossein/Documents/ahmoosavi.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
"Fetching external posts from medium.com:"
"...fetching https://medium.com/@al-folio/displaying-external-posts-on-your-al-folio-blog-b60a1d241a0a?source=rss-17feae71c3c4------2"
         AutoPages: Disabled/Not configured in site.config.
        Pagination: Complete, processed 1 pagination page(s)
       Imagemagick: Disabled in site.config
       Jekyll Feed: Generating feed for posts
   Jekyll Diagrams: Command Not Found: mmdc
                    ------------------------------------------------
      Jekyll 4.3.1   Please append `--trace` to the `build` command
                     for any additional information or backtrace.
                    ------------------------------------------------
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:39:in `exec': SyntaxError: Expected identifier, string or number (ExecJS::RuntimeError)
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:14:in `initialize'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/execjs-2.8.1/lib/execjs/runtime.rb:72:in `new'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/execjs-2.8.1/lib/execjs/runtime.rb:72:in `compile'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/execjs-2.8.1/lib/execjs/module.rb:27:in `compile'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/uglifier-4.2.0/lib/uglifier.rb:184:in `context'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/uglifier-4.2.0/lib/uglifier.rb:221:in `run_uglifyjs'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/uglifier-4.2.0/lib/uglifier.rb:166:in `compile'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/htmlcompressor-0.4.0/lib/htmlcompressor/compressor.rb:546:in `compress_javascript'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/htmlcompressor-0.4.0/lib/htmlcompressor/compressor.rb:502:in `block in process_script_blocks'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/htmlcompressor-0.4.0/lib/htmlcompressor/compressor.rb:501:in `map!'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/htmlcompressor-0.4.0/lib/htmlcompressor/compressor.rb:501:in `process_script_blocks'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/htmlcompressor-0.4.0/lib/htmlcompressor/compressor.rb:490:in `process_preserved_blocks'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/htmlcompressor-0.4.0/lib/htmlcompressor/compressor.rb:216:in `compress'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:79:in `output_html'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:32:in `output_compressed'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:182:in `write'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:231:in `block in write'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:368:in `block (2 levels) in each_site_file'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:365:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:365:in `block in each_site_file'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:364:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:364:in `each_site_file'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:230:in `write'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/site.rb:82:in `process'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:28:in `process_site'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:65:in `build'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:36:in `process'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.1/exe/jekyll:15:in `<top (required)>'
        from C:/Ruby31-x64/bin/jekyll:25:in `load'
        from C:/Ruby31-x64/bin/jekyll:25:in `<main>'

Summary:

  • Installing Node.Js
  • Adding gem ‘wdm’, ‘~> 0.1.0’ on the GemFile => Groups
  • Commented out # gem ‘mini_racer’
  • use gem env to check your gem path, and then go to gems\jekyll-imagemagick-1.4.0\lib\jekyll-imagemagick\convert.rb in my ruby directory and change the command from convert to magick convert.

Everything works, but I have not tried to push it to GitHub yet.

@petrasvestartas I could not figure out the mini_racer problem, so I commented it out in my Gemfile for now. I wanted to mention that your other error may be due to the fact that convert.exe is a windows application that is being called instead of magick convert.

To fix it, I went into gems\jekyll-imagemagick-1.4.0\lib\jekyll-imagemagick\convert.rb in my ruby directory and changed the command from convert to magick convert.

I had this problem, but solved it by including this line in the gemfile gem 'wdm', '>=0.1.0'

This tells Ruby you’re on a windows and libv8 loads successfully. However, you need to comment it out for deployment.

I had the same issue and solved it by doing these (I’m on macOS 12.4):

  1. commenting out mini_racer and installing Node.js
  2. gem uninstall nokogiri, then choose the one with “arm64” suffix
  3. bundle install
  4. brew install imagemagick (thanks jbudlender for this tip)

I also did a bunch of other things but I think these are all that matter. Hope that helps!

@Xiangyue-Zhang Can you provide a link to your repository?

For the record,we can’t link to twitter.com when we use terminal in China,even if we use a vpn.

Same problem here in Iran, I just deleted this twitter markdown file.

My computer doesn’t have the capability to use Docker, are we going to close it and ask everyone to get a better computer? It doesn’t hurt to keep it open until someone finds a solution, does it?

Hmm, That’s just odd to me. It seems to me that docker can be installed on any computer. Docker can even be installed on small low-resource raspberry pie computers. Are you sure about that?

I was facing the same problem with the libv8-node (16.10.0.0) installation error on Windows until yesterday. But, I just followed the steps in this https://www.taniarascia.com/make-a-static-website-with-jekyll/, mentioned in the Readme file under the ‘Getting started’ section, and was able to solve this issue.