-
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
rake webpacker:check_node errors out if no node installed #954
Comments
I have a related question. Why doesn't the check_node task see node? node is installed using nvm. node -v returns the version. But the task says No such file or directory - node. At the same moment, the check_yarn task sees the yarn version correctly. UPD: this helped - koenpunt/capistrano-nvm#25 (comment) |
I have the same issue when I try to deploy my app with Docker. It fails the deployment with the output above at the precompiling process... |
begin
node_version = `node -v`
rescue Errno::ENOENT
node_version = `nodejs -v`
raise Errno::ENOENT if node_version.blank?
end This seems to work fine and report as expected. Where is this happening? locally or during deployment. |
I can also confirm this is happening when node is not installed. The reason is that when activesupport is loaded this monkeypatch suppresses
The fallback for legacy versions of node introduced in #798 doesn't actually work because of this. Since webpacker is always used alongside rails, this task should not assume that backticks behave as they do in vanilla ruby. Edit: I've opened #1105 to restore the "expected" behavior. |
Version: webpacker 3.0.2
Ruby: 2.4.2
If this code in check_node.rake is changed:
to:
it seems to behave and report:
I thought one could re-raise in rescue blocks?
The text was updated successfully, but these errors were encountered: