I am trying to create new Ruby on Rails project with:
rails new project -v 7.0.4 --css=sass --javascript=esbuild --database=mysql
And I get:
...
Add build script
run npm set-script build "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets" from "."
Unknown command: "set-script"
Did you mean this?
npm run-script # Run arbitrary package scripts
...
npm version:
% npm -v
9.1.2
% which npm
/Users/foo/.nvm/versions/node/v19.1.0/bin/npm
Interesting is that nvm help doesn't even show set-script in "All commands" list.
I am on Mac M2, not sure if relevant. I didn't find anything on google.
set-script has been deprecated as per documentation
The below should work
npm pkg set scripts.build="esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With