Javascript react中的奇怪问题:(C:\):错误:EBUSY:资源忙或已锁定,lstat';C:\hiberfil.sys';

Javascript react中的奇怪问题:(C:\):错误:EBUSY:资源忙或已锁定,lstat';C:\hiberfil.sys';,javascript,reactjs,redux,graphql,Javascript,Reactjs,Redux,Graphql,我目前正在开发一个MERNG应用程序,我正在前面进行设置,当我运行npm run start时,突然出现了这个错误 Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys' Compiling... 我搜索了这个问题,我发现,您应该删除node_模块,然后运行npm intall,我尝试了,但没有成功 这是我的package.json { "name"

我目前正在开发一个MERNG应用程序,我正在前面进行设置,当我运行npm run start时,突然出现了这个错误

Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Compiling...
我搜索了这个问题,我发现,您应该删除node_模块,然后运行npm intall,我尝试了,但没有成功

这是我的package.json

{
  "name": "client",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@apollo/client": "^3.3.14",
    "@testing-library/jest-dom": "^5.11.10",
    "@testing-library/react": "^11.2.6",
    "@testing-library/user-event": "^12.8.3",
    "apollo-link-context": "^1.0.20",
    "framer-motion": "^4.1.3",
    "moment": "^2.29.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-file-base64": "^1.0.3",
    "react-redux": "^7.2.3",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "redux": "^4.0.5",
    "styled-components": "^5.2.3",
    "styled-icons": "^10.33.0",
    "web-vitals": "^1.1.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
这是我的索引,我把我的Apollo提供者和redux设置放在那里

import React from "react";
import ReactDOM from "react-dom";
import ApolloProvider from "./ApolloProvider";

import { Provider } from "react-redux";
import { createStore } from "redux";
import { reducer } from "./reducer";

const store = createStore(reducer);

ReactDOM.render(
  <Provider store={store}>{ApolloProvider}</Provider>,
  document.getElementById("root")
);

从“React”导入React;
从“react dom”导入react dom;
从“/ApolloProvider”导入ApolloProvider;
从“react redux”导入{Provider};
从“redux”导入{createStore};
从“/reducer”导入{reducer}”;
const store=createStore(reducer);
ReactDOM.render(
{ApolloProvider},
document.getElementById(“根”)
);
这是我的阿波罗供应商

import React from "react";
import {
  ApolloClient,
  InMemoryCache,
  ApolloProvider,
  createHttpLink
} from "@apollo/client";

import App from "./App";

const httpLink = new createHttpLink({
  uri: "http://localhost:5000"
});

const client = new ApolloClient({
  link: httpLink,
  cache: new InMemoryCache()
});

export default (
  <ApolloProvider client={client}>
    <App />
  </ApolloProvider>
);

从“React”导入React;
进口{
阿波罗客户,
在记忆中,
阿波罗供应商,
createHttpLink
}来自“@apollo/client”;
从“/App”导入应用程序;
const httpLink=新建createHttpLink({
uri:“http://localhost:5000"
});
const客户端=新客户端({
链接:httpLink,
缓存:新的InMemoryCache()
});
导出默认值(
);

我的react应用程序怎么了?我对这件事很生气,因为它不知从哪里冒出来的,你知道怎么解决吗?谢谢你四次的快乐

为什么你的构建试图访问操作系统的页面文件?这是一个非常奇怪的错误。我希望这不是一些恶意软件试图在您的页面文件中查找机密信息(如密码)。。。你可能想用仪器chokidar打印一个stacktrace来找出是哪个依赖项做的,并仔细检查代码是否是良性的——如果不是,它是如何安装在你的系统上的。是的,我希望这不是什么试图攻击我的东西LOL,但可能是,我不知道它是怎么发生的,但是我会发现的!