Reputation: 43
I write in terminal npm start and after that I choose to run in web version. And i get this error I tried to fix this problem like that "npm install react-native-web" But it didn't work
It looks like you're trying to use web support but don't have the required dependencies installed.
Please install react-native-web@~0.18.7, [email protected], @expo/webpack-config@^0.17.0 by running:
npx expo install react-native-web@~0.18.7 [email protected] @expo/webpack-config@^0.17.0
If you're not using web, please ensure you remove the "web" string from the platforms array in the project Expo config.
Upvotes: 4
Views: 14598
Reputation: 1
Just in case someone get face the issues. it works for window in my case.I did twice for the practicing No more errors I am ready to start on the project.
please noted use yarn to install webpack-config not npm install it not gonna work. done you are ready to go...
Upvotes: 0
Reputation: 1
After struggling all the day to find the solution, it finally solved it this way,
npx expo install expo/webpack-config -- --force.
Note: I'm working on windows computer
Upvotes: 0
Reputation: 320
Installing both with legacy peer deps worked for me
npm i react-native-web --legacy-peer-deps
npm i react-dom --legacy-peer-deps
Upvotes: 2
Reputation: 1
Install using this command:
npx expo install react-native-web@~0.18.7
npm install @expo/webpack-config@^0.17.0
npm install [email protected]
npm start
Upvotes: 0