nxus / clientjs

Client JS compilation for Nxus applications
1 stars 0 forks source link

Error thrown when node environment doesn't set NODE_ENV #34

Open ScottMaxson opened 3 years ago

ScottMaxson commented 3 years ago

Non-fatal error during startup of the application:

Unhandled rejection WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.mode should be one of these:
   "development" | "production" | "none"
   -> Enable production optimizations or development hints.
    at webpack (/d/shared-work/seabourne/nxus-platform-boilerplate/node_modules/webpack/lib/webpack.js:31:9)
    at /d/shared-work/seabourne/nxus-platform-boilerplate/node_modules/nxus-clientjs/lib/index.js:433:31

The current nxus-platform-boilerplate does not set NODE_ENV in the npm run dev script. But, it's odd that this line https://github.com/nxus/clientjs/blob/2c983e337147d86d27972c260857338ba4953065/src/index.js#L293 isn't picking up a setting from the app config?

loppear commented 3 years ago

Ah, mismatch between dev and development there I think, we can fix that in clientjs.