-
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
Cannot deploy to staging or demo environments #1274
Comments
Please use 3.3.0 |
Thanks @gauravtiwari, I've tried deploying my branch to staging env, error message has changed slightly reflecting your changes. Please re-open?
|
Same here with the command |
Have you upgraded npm package? |
@gauravtiwari, yeah, upgraded to 3.3.0. Further to this, |
Yep but it returns a default env if both Here is a output from new rails app with webpacker 3.3.0 |
I'm having the same issue. I've added a staging section to webpacker.yml and a staging.js file and am running Getting the same error as @taylorwilliams
I'm using 3.3.0 |
In |
What @akaspick said.. so when it tries to delete the keys, in our non-standard environment, staging; it's not able too because the non-standard environment doesn't exist in the default config. |
So the contents of https://github.com/rails/webpacker/blob/master/package/config.js#L12 The next line |
@taylorwilliams @akaspick Thanks, I see. Right, it's bit confusing I am going to take a look again in the evening. Technically, on NODE/JS side |
Is there any progress?(webpacker 3.3.0) I've got same error. .../node_modules/@rails/webpacker/package/config.js:16 TypeError: Cannot convert undefined or null to object |
@khmunkhbat My current workaround is this setup in staging: export RAILS_ENV=staging |
@aldrinmartoq Unfortunately your workaround does not load the "staging" part of |
I'm getting this too (Webpacker 3.3.1) @aldrinmartoq's trick doesn't seem to fix it. |
Just released 3.4.0 and there is some documentation added in README. Please try it out and report your feedback. |
Tested with 3.4.3 and a staging configuration and the compilation failed error is resolved. However, with the configuration:
the command output states I can work around it by renaming the folder in my deploy script after it's been compiled but it does indicate that at the least |
I've tested with 3.4.3 and it still has the same compilation error.
|
@rodloboz Please make sure npm package is updated as well alongside gem.
@martron I can't reproduce your issue. Please see screenshots: Please, could you make an example repo on Github with your issue. |
Thanks all for efforts :) |
@gauravtiwari Thanks for your reply. Updating npm worked for me :) |
@gauravtiwari I cloned your custom repo and it works as expected on my machine. I also made the repo match my ruby (v2.4.1) and rails (v5.1.4) versions and it continues to compile to public/packs-staging. I copied There's something in my project that's causing the issue. I'll continue to look for differences between it and your sample repo and will let you know if I figure it out. |
@martron Are you using |
@gauravtiwari no but |
updated thanks, guys. |
I still have this issue with The following does not seem to use the configuration in
|
@nozpheratu Your NODE_ENV should be production. |
@akaspick Tried that, in either case it's using the settings in |
Same here, NODE_ENV, RAILS_ENV to staging with gem webpacker & @rails/webpacker 3.5.5. |
We have a 'staging' environment set up in our webpacker.yml:
node_modules/@rails/webpacker/lib/install/config/webpacker.yml
does not have a staging environment defined.We get the following error:
delete defaultConfig.extensions
is trying to delete keys in staging (because our own Webpacker config has a staging env defined), but is failing because the default file does not take into account staging environment.Obviously adding staging won't fix issues for others that have custom name environments.
This is an issue with
3.2.2
.Works fine in
3.2.1
.The text was updated successfully, but these errors were encountered: