-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Should "rails new --webpack=..." stop when bin/yarn fails? #103
Comments
Yes, it should fail. |
For what it's worth I just hit this with The
Looking back in amongst the output of
So I updated Node (which involved uninstalling and re-installing), deleted the app files and re-ran
Presumably this is another dependency that should cause the generation to fail. I installed yarn via: |
Probably would be good for --webpack to fail hard when Yarn is not
installed. Regular rails new shouldn't, as you may not want to use yarn.
But webpack requires it.
…On Sat, Feb 25, 2017 at 1:13 PM, Paul Sturgess ***@***.***> wrote:
For what it's worth I just hit this with Rails 5.1.0.beta1.
The rails new myapp --webpack=react command looked like it had completed
with no issues. It was only when I ran the webpack watcher that I realised
something wasn't right:
$ ./bin/webpack-watcher
sh: ./node_modules/webpack/bin/webpack.js: No such file or directory
Looking back in amongst the output of rails new:
error ***@***.***: The engine "node" is incompatible with this module. Expected version ">=4.7".
error Found incompatible module
So I updated Node (which involved uninstalling and re-installing), deleted
the app files and re-ran rails new myapp --webpack=react. The rails
application was generated again but this time in amongst the output I saw:
Yarn executable was not detected in the system
Presumably this is another dependency that should cause the generation to
fail.
I installed yarn via: npm install -g yarn, deleted the app files again
and re-ran rails new myapp --webpack=react and everything was good 👍
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAKtdQNOB8UtLt92wydGtvxdloOZsrbks5rgBragaJpZM4MIFuV>
.
|
I think we fixed this on webpacker side recently with #222. Now need to add the same checks in |
Locally I was running node version
5.0.0
which caused an error during theyarn install
step ofrails new
.loader-runner (a sub-dependency of webpack) failed because of its
engines
requirement in package.json. This prevented./bin/webpack-watcher
from running because it was not installed in thenode_modules
folder.My question is should the
rails new --wepback=...
command fail if there is an issue during theyarn install
? Afterrails new
ran and completed, with errors further up in the logs, it took some time to trace back why./bin/webpacker-watcher
was not running.Below is the full output of my rails new commands (omitted large output for brevity using
[...]
). The current working directory of the command is the root directory of cloningrails/rails
from github. The error occurs in the logs afterrun ./bin/yarn add --dev webpack webpack-merge webpack-dev-server path-complete-extname babel-loader babel-core babel-preset-latest coffee-loader coffee-script rails-erb-loader glob from "."
The text was updated successfully, but these errors were encountered: