Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I am getting this error message when I run react js project first time in my system?

  1. When I run npm start, I get this error message:

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:\pagefile.sys' Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys' Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys' Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys' Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys' Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys' Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys' Error from chokidar (C:\node_modules): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'

like image 457
Vikram Shekhawat Avatar asked May 24 '20 11:05

Vikram Shekhawat


4 Answers

follow the below steps:

  1. Delete node_modules folder.
  2. run npm install .
  3. run npm cache clean .

*first 2 steps worked for me.
like image 191
kartik tyagi Avatar answered Oct 23 '22 19:10

kartik tyagi


Delete node_modules folder and then run:

npm install && npm clean-install react-scripts
like image 3
Dohd Avatar answered Oct 23 '22 17:10

Dohd


running

npm install --cache /tmp/empty-cache

Solves the problem for me.

like image 2
Lokeshwaran Avatar answered Oct 23 '22 19:10

Lokeshwaran


I fixed this issue by installing the chart.js: 2.5.0 dependency. The issue with my code is that I was using react-chartjs-2 dependency and in order to use it, I needed to install chart.js.

Note that I had to install it manually. npm i wasn't working. Hope it helps.

like image 2
Odair Vaz Avatar answered Oct 23 '22 17:10

Odair Vaz