当我:npm install 时,react 本机项目显示“MaxListenersExceededWarning”警告

问题描述 投票:0回答:1

在尝试在我的 React Native 项目中执行“npm install”时,我一次又一次地遇到此错误。它还会关闭我的无线路由器一段时间。

这是终端中的完整错误。我试图在网上寻找解决方案,但无法很好地完成。 我的节点版本 20.7.0 我的 npm 版本 10.1.0

(node:10092) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin 
is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is 
no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'D:\\rise-ai\\node_modules\\react-native',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'D:\rise-ai\node_modules\react-native\ReactCommon\react\renderer\textlayoutmanager'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'D:\\rise-ai\\node_modules\\react-native\\ReactCommon\\react\\renderer\\textlayoutmanager'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'D:\\rise-ai\\node_modules\\@react-native',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'D:\rise-ai\node_modules\@react-native\gradle-plugin\src'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'D:\\rise-ai\\node_modules\\@react-native\\gradle-plugin\\src'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz failed, reason: read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
 
node.js react-native node-modules npm-install
1个回答
0
投票

就我而言,这是由于网速缓慢而发生的。当互联网足够快时问题就解决了

© www.soinside.com 2019 - 2024. All rights reserved.