Closed coderabsolute closed 7 years ago
There is an error with Webpack,: Unknown argument cors
When we launch npm start, we launch webpack-dev-server --inline --progress --cors --port 3000 --content-base src
Wondering, how can I fix it?
i don't know, i searching... Make sure you have the latest version of nodeJS by checking "node -v" in your cmd. Then update it by download the latest package in nodejs.org.
There was a modification in the repo : https://github.com/angular/angular2-seed/commit/06a74556492e029cb4b0912925832d7dd19969b8
Edit your package.json and remove de --cors line 8. and retry to write "run start".
It work for me, Enjoy !
Hi, what is the --cors intended to do?
The --cors option works with webpack-dev-server 1.16.2, and it's not in the documentation (it's not even appearing with the --help option). I supose it's related with https://github.com/webpack/webpack-dev-server/pull/110 but honestly I don't see the need of the cors option as a general solution.
Thx for the Link! So this option will enable Cross-Origin Resource Sharing on newer webpack-dev-server.
So for local development it is unnecessary I think...
sorry about that, it's fixed now. thanks
I get this error when I run the
"npm start"
, can someone please help?