Does anybody know why vue localhost:8080 failed to compile


#1

when I am running npm run dev by default it working but when I want to change code in component/HelloWorld the output is this
Failed to compile.

./src/components/HelloWorld.vue
Module build failed: Error: ENOENT: no such file or directory, open ‘C:\Users\Garnik\Desktop\vuee\app\src\components\HelloWorld.vue’
@ ./src/router/index.js 3:0-49
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js


#2

Check your package.json if there is a ‘dev’ inside the scripts property.

Should look something like this.

"scripts": {
  "dev": 
}

#3

i had same problem before, just google it, u gonna find out it, i was having same problem beofore and i need to upgrade to webpack 4 , and do some config,


#4

yes it look like
“scripts”: {
“dev”: “cross-env NODE_ENV=development webpack-dev-server --open --hot”,
“build”: “cross-env NODE_ENV=production webpack --progress --hide-modules”
},


#5

Just to be sure are your running the command from the folder where your package.json lives?


#6

when I am running npm run dev by default it working but when I want to change code in component/HelloWorld the output is this
Failed to compile.

./src/components/HelloWorld.vue
Module build failed: Error: ENOENT: no such file or directory, open ‘C:\Users\Garnik\Desktop\vuee\app\src\components\HelloWorld.vue’
@ ./src/router/index.js 3:0-49
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js


#7

This is a completely different problem than your first problem.
Please create a new topic :slight_smile:


#8

ok, thanks