menu

Questions & Answers

Why is my vue development server not updating after a change?

First post so don't roast me too hard.

I am running a development server for my Vue app with npm run serve. The server takes several minutes to start and build. I read online that my changes should reload the server, this is not the case. I am new to Vue and npm so I am not sure what to do.

Here is what my terminal says:

npm run serve

> myapp@0.1.0 serve
> vue-cli-service serve --host localhost

 INFO  Starting development server...


 DONE  Compiled successfully in 103891ms                                                                            3:30:58 AM

  App running at:
  - Local:   http://localhost:8080/
  - Network: http://localhost:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

And here is my package.json

{
  "name": "myapp",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve --host localhost",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.8.3",
    "vue": "^3.2.13"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "@babel/eslint-parser"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead",
    "not ie 11"
  ]
}

I tried the solutions on this post but nothing worked.

Anyone have any ideas?

Update

Got it to work much faster by switching from working in the windows file system to the Linux one.

Comments:
2023-01-07 20:29:55
Is the code in a NFS mount, in any chance? Also - which OS are you using?
2023-01-07 20:29:55
@madflow No and I am on WSL2 Ubuntu
Answers(0) :