我正在使用 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/