webpack@2 and --env.dev: TypeError: Cannot convert undefined or null to object
See original GitHub issueI am trying to use this new feature (found here https://gist.github.com/sokra/27b24881210b56bbaff7#configuration)
$ webpack-dev-server --inline --open --hot --env.dev
.../webpack.config.babel.js:29
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
^
TypeError: Cannot convert undefined or null to object
at Function.from (native)
at _toConsumableArray (webpack.config.babel.js:7:1)
at _default (webpack.config.babel.js:64:3)
at module.exports (.../node_modules/webpack/bin/convert-argv.js:103:13)
at Object.<anonymous> (.../node_modules/webpack-dev-server/bin/webpack-dev-server.js:115:48)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:148:18)
at node.js:405:3
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Webpack-cli - TypeError: Cannot convert undefined or null to ...
All it is saying is that it expects an object of some type but it has null as the object may be set...
Read more >【报Bug】vue create创建的项目webpack4报错TypeError
INFO Starting development server... ERROR TypeError: Cannot convert undefined or null to object TypeError: Cannot convert undefined or null ...
Read more >npm err! cannot convert undefined or null to object - You.com
npm install returns "TypeError: Cannot convert undefined or null to object" ... cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch ...
Read more >Npm update error "Cannot convert undefined or null to object"
node-red directory I get the error "Cannot convert undefined or null to object". The Idealtree seems to run to completion.
Read more >Cannot convert undefined or null to object at Function.entries
This page uses a programList object provided by Wix that lists all the program. I noticed that whenever I get the concerned error...
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
I checked the spec and it’s correct that this is not supported. But you could do this:
Indeed, that’s what I am doing! Thanks.