webpack.base.babel.js bug when running npm run build
See original GitHub issueCame across a very strange bug when running
npm run build
Basically, in the file ./internals/webpack/webpack.base.babel.js if you set the property stats to true you will see the following:
devtool: options.devtool,
target: 'web', // Make web variables accessible to webpack, e.g. window
stats: true, // Don't show stats in the console <--- this is the line
progress: true,
Results in
> reactjs-boilerplate@2.4.0 build /Users/xxxx/reactjs-boilerplate
> cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --colors -p
/Users/xxxx/reactjs-boilerplate/node_modules/webpack/bin/webpack.js:63
var outputOptions = Object.create(options.stats || firstOptions.stats || {});
^
TypeError: Object prototype may only be an Object or null: true
at Function.create (native)
at processOptions (/Users/xxxx/reactjs-boilerplate/node_modules/webpack/bin/webpack.js:63:29)
at Object.<anonymous> (/Users/xxxx/reactjs-boilerplate/node_modules/webpack/bin/webpack.js:192:1)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:457:10)
at startup (node.js:136:18)
at node.js:972:3
I’m having trouble finding what this option does. Any clues?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
webpack is failing while trying to compile in production mode
This is my current webpack.base.babel.js file: ... The big deal comes out to stage if I say npm run-script build , if so...
Read more >babel-loader - webpack
This package allows transpiling JavaScript files using Babel and webpack. ... NOTE: You must run npm install -D @babel/plugin-transform-runtime to include ...
Read more >babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ......
Read more >ts-loader - npm
Start using ts-loader in your project by running `npm i ts-loader`. ... Create or update webpack.config.js like so:.
Read more >Create React App without Create React App - Bits and Pieces
How webpack and babel work in a more practical sense; ... now running npm run build will create main.js file again but the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, @learntoswim Seems like options.stats must be an object. Try something like this:
You can find more info here
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.