Skip to content
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

NODE_ENV not in default config causes error #1266

Closed
pstjean opened this issue Feb 12, 2018 · 1 comment
Closed

NODE_ENV not in default config causes error #1266

pstjean opened this issue Feb 12, 2018 · 1 comment

Comments

@pstjean
Copy link

pstjean commented Feb 12, 2018

As of 3.2.2, when NODE_ENV is not set to one of the values in the default config (webpacker/lib/install/config/webpacker.yml) i.e. development, test or production, you get the following error:

  delete defaultConfig.extensions
         ^

TypeError: Cannot convert undefined or null to object
    at Object.<anonymous> (node_modules/@rails/webpacker/package/config.js:15:10)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (node_modules/@rails/webpacker/package/rules/babel.js:2:24)
    at Module._compile (module.js:570:32)

This was introduced in #1253, and it will only occur if there are extensions configured in the app configuration.

We discovered this when deploying to our stage environment.

@pstjean
Copy link
Author

pstjean commented Feb 12, 2018

Closing as a duplicate of #1265

@pstjean pstjean closed this as completed Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant