I'm new to vue and those types of webservers, so please forgive me. Before I install vue-router my project is fine, but after I install it, I've got this really strange error in any new vue project (created using the vue cli):
ERROR Failed to compile with 1 error 4:52:15 PM
error in ./node_modules/@vue/devtools-api/lib/esm/proxy.js
Module parse failed: Unexpected token (3:10)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { HOOK_PLUGIN_SETTINGS_SET } from './const';
| export class ApiProxy {
> target;
| targetQueue;
| proxiedTarget;
@ ./node_modules/@vue/devtools-api/lib/esm/index.js 3:0-35 14:40-48
@ ./node_modules/vue-router/dist/vue-router.esm-bundler.js
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://10.8.0.1:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
I do not exactly know what this even means, or how I could start fixing it. Since it happens in any new vue project, my working hypothesis is, that I have somehow messed something up with my global npm packages (or npm itself). For context I am on an Ubuntu Server (20.04), and once upgraded npm itself from 6.14.x to 8.x.x after I was prompted very largely with the possibility and thought that was a good idea. Then suddenly I got a bunch of vulnerabilities and now have downgraded to 6.14.15. Possibly that might have something to do with it (?).
Met the same problem. Changed Node version to 14.18.1 instead of 17.3.0 (nvm use 14.18.1).