首页 > 解决方案 > 为什么我在系统中第一次运行 react js 项目时收到此错误消息?

问题描述

  1. 当我运行时npm start,我收到以下错误消息:

来自 chokidar (C:) 的错误:错误:EBUSY:资源繁忙或锁定,lstat 'C:\hiberfil.sys' 来自 chokidar (C:) 的错误:错误:EBUSY:资源繁忙或锁定,lstat 'C:\pagefile。 sys' 来自 chokidar (C:) 的错误:错误:EBUSY:资源繁忙或锁定,lstat 'C:\swapfile.sys' 来自 chokidar (C:\node_modules) 的错误:错误:EBUSY:资源繁忙或锁定,lstat 'C :\hiberfil.sys' 来自 chokidar (C:\node_modules) 的错误:错误:EBUSY:资源繁忙或锁定,lstat 'C:\pagefile.sys' 来自 chokidar (C:\node_modules) 的错误:错误:EBUSY:资源繁忙或锁定,来自 chokidar (C:\node_modules) 的 lstat 'C:\swapfile.sys' 错误:错误:EBUSY:资源繁忙或锁定,来自 chokidar (C:\node_modules) 的 lstat 'C:\hiberfil.sys' 错误:错误:EBUSY:资源繁忙或锁定,lstat 'C:\pagefile.sys'来自 chokidar (C:\node_modules) 的错误:错误:EBUSY:资源繁忙或锁定,lstat 'C:\swapfile.sys'

标签: javascriptreactjsnpmreact-routernpm-start

解决方案


follow the below steps:

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

*first 2 steps worked for me.

推荐阅读