Angular 17 srr: vite Internal server error: Invalid URL

231 Views Asked by At

Even after a successful build, when I run ng serve --host: myIP, I'm getting this error. The intentions was to able to get a feel of the behavior of the app on mobile devices.

5:50:58 PM [vite] Internal server error: Invalid URL
      at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
      at new NodeError (node:internal/errors:399:5)
      at URL.onParseError (node:internal/url:565:9)
      at new URL (node:internal/url:645:5)
      at C:\Users\USER PC\Desktop\Afudaa\store\node_modules\@angular-devkit\build-angular\src\builders\dev-server\vite-server.js:536:44
      at C:\Users\USER PC\Desktop\Afudaa\store\node_modules\@angular-devkit\build-angular\src\builders\dev-server\vite-server.js:577:55

I commented out the entire server.ts file to trace where the error is comming from. The app still compiles, but the errors comes next. Causing the app to fail loading.

0

There are 0 best solutions below