D
D
Dmitry2020-10-26 00:14:39
Node.js
Dmitry, 2020-10-26 00:14:39

What could be the problem when running webpack-dev-server?

Hello!
When working with webpack, a not entirely clear problem appeared, namely:
when running npm run start:dev, an error occurs like -
https://pastebin.com/KsXkKWYA

package.json settings
https://pastebin.com/xB549VW4

webpack.config settings .js
https://pastebin.com/Xwd9Nduk

At the same time, if you use a regular assembly, then everything is OK, the problem is only when using dev-server

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
krundetz, 2020-10-27
@krundetz

1.At you from the console passes?

npx run cross-env NODE_ENV=production webpack-dev-server --open

2. What is your understanding of the usual assembly?
3. You have an extra space in your line.
"build": "cross-env NODE_ ENV=production webpack --mode production"

4. Why do you even need this environment variable? Why doesn't it fit?
"start:dev": "webpack-dev-server --open --mode=development",

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question