v2.3.0 - devServer.colors option not working
See original GitHub issuepackage.json devDependencies “webpack”: “^2.1.0-beta.25”, “webpack-dev-server”: “^2.1.0-beta.0”,
i checked the package.json present in node_modules/webpack-dev-server folder it shows 2.3.0 which is the latest release according to npm.
webpack devServer config
devServer: {
hot: true,
progress: true,
colors: true,
host: devServerSettings.FLASH_DEV_SERVER_HOST,
port: devServerSettings.FLASH_DEV_SERVER_PORT,
},
ERROR:
Invalid configuration object. webpack-dev-server has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'colors'. These properties are valid:
object { hot?, hotOnly?, lazy?, host?, filename?, publicPath?, port?, socket?, watchOptions?, headers?, clientLogLevel?, overlay?, key?, cert?, ca?, pfx?, pfxPassphrase?, inline?, public?, https?, contentBase?, watchContentBase?, open?, features?, compress?, proxy?, historyApiFallback?, staticOptions?, setup?, stats?, reporter?, noInfo?, quiet?, serverSideRender?, index?, log?, warn? }
npm ERR! Linux 3.19.0-68-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v5.0.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! belong@1.0.0 dev: `webpack-dev-server --config /home/avinash/code/flash/webpack.devoffice.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the belong@1.0.0 dev script 'webpack-dev-server --config /home/avinash/code/flash/webpack.devoffice.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the belong package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --config /home/avinash/code/flash/webpack.devoffice.config.js
npm ERR! You can get their info via:
npm ERR! npm owner ls belong
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/avinash/code/flash/npm-debug.log
i checked the node_modules/webpack-dev-server/bin/webpack-dev-server.js source
it does have the following code
"color": {
type: "boolean",
alias: "colors",
default: function supportsColor() {
return require("supports-color");
},
group: DISPLAY_GROUP,
describe: "Enables/Disables colors on the console"
},
while searching for solutions I came across this issue https://github.com/webpack/webpack-dev-server/issues/609 which was a missing devServer.progress issue
is similar fix needed for devServer.colors?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
DevServer - webpack
This option allows specifying URL to web socket server (useful when you're proxying dev server and client script does not always know where...
Read more >webpack-dev-server: command not found - Stack Overflow
I fixed the error configuration has an unknown property 'colors' by removing colors:true . It worked! Share.
Read more >DevServer - webpack 3 documentation
devServer. object. This set of options is picked up by webpack-dev-server and can be used to change its behavior in various ways.
Read more >webpack-dev-server - npm
Allows to configure options for serving static files from directory (by default 'public' directory).
Read more >Configuring quasar.config.js
You can also do async work before returning the quasar configuration: ... requires @quasar/app-webpack v3.3+) // opens Google Chrome devServer: { open: ...
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

Thanks for your clear bugreport! Whether your terminal has color support is now calculated automatically, so you could remove that property from your config. If you want to force it, you can pass
--color(or--no-color). Another options is to addstats: { colors: true }indevServer, but that shouldn’t be necessary.This was not part of any changelog (AFAIK), sorry!
Pruning due to age.