4

In a new Angular app I'm getting the following error:

Error from chokidar : Error: UNKNOWN: unknown error, watch

I've deleted and re-installed node_modules, downloaded the entire project again etc.

Node version is 12.18.2

pim
  • 41
  • 1
  • 1
  • 2
  • `chokidar` is this any kind of package you are using? – Pardeep Jain Jul 29 '20 at 06:07
  • `chokidar` is used by default when creating a new Angular app. It is used to serve the project for testing etc. https://www.npmjs.com/package/chokidar – pim Jul 29 '20 at 06:15
  • i didn't know that, thanks. Can you try running `npm cache clean -f` and then same steps to install application – Pardeep Jain Jul 29 '20 at 06:28
  • 1
    Yes cleared the cache and removed/reinstalled all the node_modules to try to fix it but still getting the same... – pim Jul 29 '20 at 06:32

5 Answers5

11

Is your project on a network drive? Move the project to local drive, issues should go away.

The files might be local, but accessed through SMB protocol (exp. through drives created with net use Z: \\localhost\C$\path\to\my\project command). This will generate same issue.

Grogi
  • 2,099
  • 17
  • 13
4

I had this issue. Try creating the angular app in C drive only. Worked for me.

Aditya
  • 41
  • 4
  • this helped me - most of the organizations hae network drives and they treat it like D drive or H drive , as soon as i cloned my code in C: - it started working - no other change were needed – Ashish Shetkar Aug 10 '22 at 11:54
4

you need to just Delete the node module folder

npm install
npm cache clean
azeem
  • 341
  • 3
  • 4
1

Create Angular app in "C:" Drive only, not in any network drive. Run the app/commands from "C:" drive only and it worked for me. Try this out.

Sam
  • 11
  • 1
0

Try to install it manually.

npm i chokidar

It worked for me. I ran my project after 2 years.