我一次又一次地收到这个错误,并且在开发 react-native 应用程序时对 npm 中的这个 enoent 错误感到非常困惑。每当我为一个包解析 enoent 包并尝试安装另一个包时,我都会收到此错误。请以应有的尊重帮助我了解使用该软件包的明显区别并避免出现此错误。代码在这里:
PS C:\Users\subba-workstation\Desktop\ecom-App-stlwrt> npm install @react-navigation/drawer
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\subba-workstation\Desktop\ecom-App-stlwrt\node_modules\@react-navigation\drawer
npm ERR! dest C:\Users\subba-workstation\Desktop\ecom-App-stlwrt\node_modules\@react-navigation\.drawer.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\subba-workstation\Desktop\ecom-App-stlwrt\node_modules\@react-navigation\drawer' -> 'C:\Users\subba-workstation\Desktop\ecom-App-stlwrt\node_modules\@react-navigation\.drawer.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\subba-workstation\AppData\Roaming\npm-cache\_logs\2020-09-24T12_27_04_997Z-debug.log