react-native - 错误 : ENOENT: no such file or directory, 打开 'fs.js

标签 react-native expo fs

我正在使用 expo-cli 在 React Native 中工作。
到目前为止我所做的只是

expo init myapp
在向我的 app.js 文件添加文本后,我尝试做
npm start
这给了我这个错误
Error: ENOENT: no such file or directory, open 'fs.js
我没有使用任何与 fs.js 相关的东西,据我从错误页面看到的,错误在
.../node_modules/metro/src/Server.js:99:24)
其他文件堆栈系统将其称为 Metro。
我正在使用 VS 代码和 Linux Mint 进行开发。我的世博会版本是:4.3.0
世博会诊断结果
Expo CLI 4.3.0 environment info:
    System:
      OS: Linux 5.4 Linux Mint 20.1 (Ulyssa)
      Shell: 5.0.17 - /bin/bash
    Binaries:
      Node: 10.19.0 - /usr/bin/node
      npm: 6.14.4 - /usr/bin/npm
    npmPackages:
      expo: ~40.0.0 => 40.0.1 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 
      react-native-web: ~0.13.12 => 0.13.18 
    npmGlobalPackages:
      expo-cli: 4.3.0
    Expo Workflow: managed

最佳答案

尝试以管理员身份启动 sudo yarn start

关于react-native - 错误 : ENOENT: no such file or directory, 打开 'fs.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66571306/

相关文章:

react-native - 带有 jest 的 React Native 平台特定测试

javascript - 'ActionSheetIOS' 未从 'react-native-web/dist/index' 导出

android - 如何修复AAPT:在包“android”中找不到属性“appComponentFactory”的资源标识符?

node.js - 升级到 expo 31. react-native-dot-env 错误 : react native does not support node standard library

react-native - 49 届世博会上的 Google Auth

javascript - 使用fs writeFile时出现EISDIR错误,但该文件夹确实存在

node.js - fs.readFile(<Buffer> | <integer) 如何工作?

node.js - Node fs rmdir 类型错误 'Callback must be a function'

react-native - React Native中可能存在未处理的Promise Rejection网络错误

android - 已发布应用程序上的 Sqlite 表和数据库迁移?