'Vue.js: Error after configuring Router.js. Vue/types/umd. chokidar (C drive error)

I was running a dev server after changing my router.js file. Adding a webpage .vue file to the configuration. After doing so it failed to compile with only one errors. This is the output:

This dependency was not found:
* vue/types/umd in ./src/router.js
To install it, you can run: npm install --save vue/types/umd
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'

I tried the advice, and installed vue/types/umd and it still compiled with an error. I then uploaded my project to GitLab. Deleted the project on my Documents folder then downloaded it again. Used npm install then the typical npm run serve and still the same error.



Solution 1:[1]

Check if by accident this kind of import didn't appear in your file ./src/router.js. I had this error when this line appeared in my file. Probably I pressed some key when wanted to use nextTick. In your case it could be attempt to import router. So when I removed this import line everything went back to normal.

import { nextTick } from 'vue/types/umd';

enter image description here

Solution 2:[2]

npm install --save vue/types/umd

npm ERR! code ENOLOCAL npm ERR! Could not install from "vue/types/umd" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in: npm ERR! /home/lenovo/.npm/_logs/2022-05-16T17_40_02_280Z-debug.log

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TheMalni
Solution 2 Aziz