We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When run npm run build, get error: TypeError: Can't call method on undefined.
npm run build
TypeError: Can't call method on undefined
After debug the code, I find the reason:
// tools/config.js#L93 const appConfig = merge({}, config, { entry: [ ...(WATCH && ['webpack-hot-middleware/client']), './src/js/app.js', ], // ... }
when WATCH if falsy(here undefined), ...(undefined) leads to the error.
WATCH
undefined
...(undefined)
So, make it like ...(WATCH ? ['webpack-hot-middleware/client'] : []) ?
...(WATCH ? ['webpack-hot-middleware/client'] : [])
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When run
npm run build
, get error:TypeError: Can't call method on undefined
.After debug the code, I find the reason:
when
WATCH
if falsy(hereundefined
),...(undefined)
leads to the error.So, make it like
...(WATCH ? ['webpack-hot-middleware/client'] : [])
?The text was updated successfully, but these errors were encountered: