Which terminal emulator? Current versions of Windows use Powershell, so you do
To set it for the current session
If you’re using cmd, then
Then run your
webpack-dev-server command as normal
If that’s a new screenshot, then that’s exactly the same thing you were running before so you’ll get the same error. You need to set the variable then run the command, you can’t set the variable on the same line like you can on a Unix system
You may have to use WSL
Using cross-env seems to work. I didn’t really test it but it did run. Install it as a dev dependency and change the start script.
"start": "cross-env GENERATE_ENV_JS=1 webpack-dev-server --mode development"
It can’t find the things you’re trying import, so I assume the
import declarations you have in those files are incorrect.
I wouldn’t be surprised if it was more issues with Windows. As you are running Windows 10 I would suggest trying WSL.
Not sure if this is related or a fix (I didn’t test it)