Hello! My apologies, I'm waaaaay out of my depth so please pardon my ignorance.
When using rails new foobar -j esbuild --css bootstrap to initialize a new rails 7.0.8 app I receive:
Add watch:css script
run npm pkg set scripts.watch:css="nodemon --watch ./app/assets/stylesheets/ --ext scss --exec "yarn build:css"" from "."
npm ERR! code EUSAGE
npm ERR!
npm ERR! npm pkg set expects a key=value pair of args.
npm ERR!
npm ERR! Manages your package.json
npm ERR!
npm ERR! Usage:
npm ERR! npm pkg set <key>=<value> [<key>=<value> ...]
npm ERR! npm pkg get [<key> [<key> ...]]
npm ERR! npm pkg delete <key> [<key> ...]
npm ERR! npm pkg set [<array>[<index>].<key>=<value> ...]
npm ERR! npm pkg set [<array>[].<key>=<value> ...]
npm ERR! npm pkg fix
npm ERR!
npm ERR! Options:
npm ERR! [-f|--force] [--json]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces]
npm ERR!
npm ERR! Run "npm help pkg" for more info
This appears to be from the nested double quotes. By hand-editing
vendor/bundle/ruby/3.2.0/gems/cssbundling-rails-1.3.2/lib/install/bootstrap/install.rb
and changing line 25 from:
add_package_json_script("watch:css", "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \"#{bundler_run_cmd } build:css\"", false)
to
add_package_json_script("watch:css", "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec '#{bundler_run_cmd } build:css'", false)
The error goes away. (Changed the escaped double-quotes to single quotes.)
Hello! My apologies, I'm waaaaay out of my depth so please pardon my ignorance.
When using
rails new foobar -j esbuild --css bootstrap
to initialize a new rails 7.0.8 app I receive:This appears to be from the nested double quotes. By hand-editing
vendor/bundle/ruby/3.2.0/gems/cssbundling-rails-1.3.2/lib/install/bootstrap/install.rb
and changing line 25 from:add_package_json_script("watch:css", "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \"#{bundler_run_cmd } build:css\"", false)
toadd_package_json_script("watch:css", "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec '#{bundler_run_cmd } build:css'", false)
The error goes away. (Changed the escaped double-quotes to single quotes.)System information: