Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module build failed , vue-router.esm.js in Vue js

I'm new to VueJs and implemented the cli-plugin-unit-jest for my project.Once i aded it to project it's show me below error

Failed to compile.

./node_modules/vue-router/dist/vue-router.esm.js
Module build failed: Error: ENOENT: no such file or directory, open '/media/abc/049A20AD9A209CE4/test/node_modules/vue-router/dist/vue-router.esm.js'

i have deleted node_module directory and re installed it.but still showing this error.

like image 664
Tje123 Avatar asked Jun 21 '19 05:06

Tje123


2 Answers

Just restart your server:

npm run serve
like image 199
ABHISHEK ANAND Avatar answered Nov 06 '22 16:11

ABHISHEK ANAND


Today I stumbled about the same problem with vue-router. You can fix this by following this steps:

cd node_modules/vue-router
npm install
npm run build

After that you have to restart

npm run serve

Source: https://router.vuejs.org/installation.html#dev-build

like image 31
HeyDanny Avatar answered Nov 06 '22 16:11

HeyDanny