-
Notifications
You must be signed in to change notification settings - Fork 97
New 7.0.1 project with --css bootstrap in not working when using old npm versions #65
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
Comments
When the npm version is too low, we output instructions during the setup on what you have to do instead: https://github.com/rails/cssbundling-rails/blob/main/lib/install/bootstrap/install.rb#L16-L21. I can see how that might be easy to miss, though. So feel free to explore ways to make it easier to diagnose with a PR 👍 |
How do you feel about stopping the process if npx is < 7.1? Like having to specify --skip-npx-check if you really know what you are doing and would like to use npm with lower version. Would this be against any of the doctrines? |
That's not going to fly since this installer is called as part of "rails new", which would leave us with an incomplete skeleton generation. Also, the remedy is already noted as part of the output: You have to add this line yourself. But we can try to find a way to make that notice more prominent. |
The notice is part of the output, it is last and is in green. I guess I missed it as I was not expecting it. All the messages that are green are:
There are some red messages like
A good idea might be to make the notice yellow (as a 'warning') or red (as a bigger warning) How about?
I could prepare a PR for it. I've searched the code in the rails organization that uses 'say' with a color other than green and could not find a case of yellow. There are some examples for :red like
Probably this
is as important as
and deserves to be red and consistent. Let me know if you think this could be a reasonable improvement. |
Like changing this to red for the "add scripts" 👍 |
This makes it more clear what needs to be done. It is based on the discussion in rails#65
This makes it more clear what needs to be done. It is based on the discussion in #65 Co-authored-by: kireto <k.mitov@robopartans.com>
This makes it more clear what needs to be done. It is based on the discussion in rails/cssbundling-rails#65 Co-authored-by: kireto <k.mitov@robopartans.com>
This makes it more clear what needs to be done. It is based on the discussion in rails/cssbundling-rails#65 Co-authored-by: kireto <k.mitov@robopartans.com>
This makes it more clear what needs to be done. It is based on the discussion in rails/cssbundling-rails#65 Co-authored-by: kireto <k.mitov@robopartans.com>
Steps to reproduce
Expected behavior
Application to show "The home page"
Actual behavior
System configuration
Rails version: 7.0.1
Ruby version: 2.7.4
Comments
I see there is app/assets/stylesheets/application.bootstrap.scss. That's good. But the project as it is created can not be started. Additional things should be done
Would it be a good idea to have the newly created project working after creating it or this is an expected behavior?
Update 1:
Note that running
is again an error.
Command taken form https://github.com/rails/cssbundling-rails
Update 2:
./bin/dev is same error
Update 3:
my NPM versoin was 6.X
I move to 8.3.0 and yarn build:css worked correctly
Update 4:
Stopped server. Installed bootstrap again with
Installed js esbuild again with
Started server again and it worked.
Then it started.
My suggestion with this issue is think of a better error when installing that would check for npm version.
The text was updated successfully, but these errors were encountered: