Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: ENOENT: no such file or directory, open 'fs.js

I am working in React Native using expo-cli.

All I did till now is

expo init myapp

And after adding a text to my app.js file, I tried to do

npm start

which gave me this error

Error: ENOENT: no such file or directory, open 'fs.js

I have not used anything related to fs.js and as far as I can see from the errors page, the error is in

.../node_modules/metro/src/Server.js:99:24)

And other file stack system is referring it to metro. I am using VS code and Linux Mint for development. My expo version is: 4.3.0

The result of expo diagnostics

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
like image 811
Shobhit Tewari Avatar asked Mar 10 '21 19:03

Shobhit Tewari


People also ask

How do I fix error Enoent No such file or directory open?

To resolve the ENOENT warning message, you need to add a package. json file in the directory where you run the npm install command. And then run your npm install command again. This time, the warning message should not appear.

What does error code Enoent mean?

It's an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories. It's abbreviated because C compilers at the dawn of time didn't support more than 8 characters in symbols. Follow this answer to receive notifications. edited Jun 4, 2019 at 14:30. community wiki.

What is npm err code Enoent?

The code ENOENT means that npm fails to open a file or directory that's required for executing the command. The npm start command is used to run the start script in the package.


Video Answer


1 Answers

try to start as an administrator with sudo yarn start

like image 96
guidev Avatar answered Oct 23 '22 11:10

guidev