Solved Error npm run serve
-
Hi,
I am trying to compile the DWC source code but when I launch the command "npm run serve" I get the following error.
What is the reason? Can someone help me?Thank you very much.
-
@amimafe What branch are you trying to build? Try to run
npm install
beforenpm run serve
. -
Hi,
i've the same problem on Ubuntu 22.04 running node v21.0.0.
I cloned the repo from git (master) and installed it with
npm install
then executednpm run serve
. The server compiles the files, and eventually displays the same error OP encountered.In addtion a more extensive error is given, when I try to access the server, see screenshot
Looking at line 91335 in sass.dart.js shows, that
navigator.userAgent
seems to beundefined
.Sadly I'm pretty new to Node/Vue so I'm not really sure, what to do next.
Any suggestions? Thanks for the great work btw. -
@amimafe @Nitroxid I could build the
master
branch immediately after cloning it without any additional changes. But I am still on Node 20, perhaps that makes a difference:> npm -v 10.2.1 > node -v v20.8.1
Also note that v3.4 and older require
NODE_OPTIONS="--openssl-legacy-provider"
to be set (as mentioned in the README) due to an incompatibility with Webpack 4. This option will be obsolete in v3.5. -
@chrishamm Thanks for the help. I got it working with Node 20.8.1.
First I reinstalled it, by deleting node_modules and running
npm install
again. And after settingNODE_OPTIONS
,npm run serve
worked. -
@chrishamm Thanks for your help. I was finally able to compile using an older version of Node.js. Version 18.18
I want to modify some DWC parameters to suit our machine.
I hope this can help other users with the same problem. -
-