Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.59.10 template Cannot find module 'react-native/Libraries/NewAppScreen' #42

Closed
Matrixbirds opened this issue Jul 8, 2019 · 2 comments

Comments

@Matrixbirds
Copy link

Matrixbirds commented Jul 8, 2019

Bug

Environment info

info 
  React Native Environment Info:
    Binaries:
      Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
      Yarn: 1.12.3 - ~/.nvm/versions/node/v10.15.0/bin/yarn
      npm: 6.5.0 - ~/.nvm/versions/node/v10.15.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 27
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.10 => 0.59.10 
    npmGlobalPackages:
      react-native-git-upgrade: 0.2.7

Reproducible sample code

   react-native init chat --version react-native@0.59.10 --template typescript
   react-native run-ios

I got this error

error: bundling failed: Error: 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:

It seems template code using 0.60.x react native feature.

@emin93
Copy link
Member

emin93 commented Jul 10, 2019

Unfortunately this template doesn't support older React Native versions, it is optimized only for the latest. To support multiple versions, the CLI has to support tagged templates which it doesn't (yet).

Closing this issue for now, let me know if you think this is wrong.

@emin93 emin93 closed this as completed Jul 10, 2019
@frags51
Copy link

frags51 commented Jul 12, 2019

@Matrixbirds remove the imports (and usages) of NewsAppScreen from your auto generated App.tsx file, you should be fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants