相关文章推荐
讲道义的硬盘  ·  C++ 将 ...·  5 月前    · 
不拘小节的口罩  ·  wpf drawingcontext ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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'

However, it started throwing same error again after I imported newly installed component in my code. And it is not going away even though I performed step 1 and 2 again. Tan Mar 11, 2021 at 23:53 The reason for the error thrown would majorly be caused by the use of an outdated versions of packages (dependencies). So, the best shot would be to follow the above 3 steps or upgrade every single dependency in the project (check inside package.json) kartik tyagi May 10, 2021 at 7:14 Yeah, I was missing some dependencies in package.json and it started working fine. Do you know why npm cache clean thorws this error npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. Tan May 10, 2021 at 22:13 There could be many reasons for that. It may occur due to npm didn't download properly, permission problem (try executing cmd with sudo ), or It could be (most obiviously) due to not clearing cache properly (use npm cache clean --force ) in that case. Also, the npm>5 have some upgrades, if you'll try removing and installing npm again, then this error may not occur. kartik tyagi May 11, 2021 at 23:58

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.

fair, I understand that, but wouldnt the error be higher up at all to where we could get more of a "cannot find module x in index.js etc"? Makes things hard to catch from an error perspective Coty Embry Dec 18, 2020 at 22:24

I had the same issue. You're probably working in a Linux environment. If it is so, before running the start script, you need to switch the terminal to sudo user.

This approach fixed my issue.

I had the same problem with nativscript/angular router.

Problem was bad import. I mean deep import like @nativescript/angular/router .

I changed it to @nativescript/angular because there is no more deep imports.

Maybe it is a similar problem with your react-router.

Here are some things you can try to fix the error message:

  • Delete all directories on C:\Users\<Username>\AppData\Local\Temp\ that start with npm-.
  • npm cache clean
  • Run as an administrator
  • Ref: npm Error : EBUSY resource busy or locked / npm | GitHub

    The problem was got solved by running the same command with "Run as Administrator" in command prompt. Vikram Shekhawat May 24, 2020 at 12:52

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .