excid3 / jumpstart

Easily jumpstart a new Rails application with a bunch of great features by default
http://jumpstartrails.com
MIT License
1.2k stars 316 forks source link

Fails at add_esbuild_script set-script deprecated in npm v9 #190

Closed fordnox closed 1 year ago

fordnox commented 1 year ago

This check expect npm version >7 v8 includes this command. which was good until v9 where it was deprecated.

Add another solution for when npm version > 9

My versions:

❯ ruby -v ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]

❯ npx -v 9.2.0

❯ npm -v 9.2.0

Ray-Hughes commented 1 year ago

Upgrading to node v16.14.0 and npm 8.3.1 should be a workaround for this

excid3 commented 1 year ago

We can update this to match what Rails does. https://github.com/rails/jsbundling-rails/blob/main/lib/install/esbuild/install.rb