Akira Kusama
Akira Kusama

Reputation: 55

How to solve "NewAppScreen" problem of expo (React native)

I tried to build app made by expo in expo client. However, this problem occurred.

 While resolving module `react-native/Libraries/NewAppScreen`, the Haste package `react-native` was found. However the module `Libraries/NewAppScreen` could not be found within the package. Indeed, none of these files exist:

  * `/Users/Akira/Desktop/ExpoProjects/GakuinApp/NewReact/node_modules/react-native/Libraries/NewAppScreen(.native||.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.json|.native.expo.json|.expo.json|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
  * `/Users/Akira/Desktop/ExpoProjects/GakuinApp/NewReact/node_modules/react-native/Libraries/NewAppScreen/index(.native||.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.json|.native.expo.json|.expo.json|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
Failed building JavaScript bundle.

Node and Expo are latest version. I tried to re-install node_modules.

By the way, I checked "/Users/Akira/Desktop/ExpoProjects/GakuinApp/NewReact/node_modules/react-native/Libraries/NewAppScreen/", but there is no folder. I don't know how to get this folder.

Upvotes: 4

Views: 2022

Answers (3)

Abhinav Saxena
Abhinav Saxena

Reputation: 2044

The module NewAppScreen is not available.

Please see:

react-native-template-typescript/issues/42

Upvotes: 1

SuleymanSah
SuleymanSah

Reputation: 17858

I had this issue recently, and noticed that in visual studio code, my auto import plugin imported something from "react-native/Libraries/NewAppScreen" wrongly.

Something like this:

import { Colors } from "react-native/Libraries/NewAppScreen";

But I just wanted to import Colors from my own file, maybe you had this kind of issue.

You can search all your project with a text editor if there is something imported from "react-native/Libraries/NewAppScreen".

Upvotes: 4

MonoThreaded
MonoThreaded

Reputation: 12033

I had a similar issue when the following line popped up in my code

import { DebugInstructions } from 'react-native/Libraries/NewAppScreen';

I was fine after commenting it out

Upvotes: 1

Related Questions