react-native: New project fails on react-native@0.46

Is this a bug report?

Yes

Have you read the Bugs section of the Contributing to React Native Guide?

Yes

Environment

  1. react-native -v: 0.46.0
  2. node -v: 8.1.3
  3. npm -v: 5.0.3
  4. yarn --version (if you use Yarn): 0.27.5

Then, specify:

  1. Target Platform (e.g. iOS, Android): iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra (10.12.5 (16F73)
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode 8.3.3

Steps to Reproduce

(Write your steps here:)

  1. react-native init Test
  2. cd Test
  3. react-native run-ios

Expected Behavior

App would go through build process and start app in iOS Simulator, and packager in a terminal window.

Actual Behavior

Error in simulator simulator screen shot jul 6 2017 9 34 25 am

Error in packager Terminal Saved Output.pdf

Reproducible Demo

It’s a fresh project built with react-native-cli.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 6
  • Comments: 22 (7 by maintainers)

Most upvoted comments

Removing .babelrc seems to temporarily fix the issue

I’ve had a lot of issues with React Native version 0.45 and up. One thing that I found is that React Native doesn’t play well with npm 5. Switch to npm 4. Do this with npm install -g npm@latest-4. If that doesn’t help, simply switch to React Native 0.44.0. That’s what I’m using, and you’re not missing out on much by going back. When starting a new project, run react-native init projectname --version 0.44.0. Hope that helps!

npm run android

> app@0.0.0 android /app
> react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android

Scanning folders for symlinks in /app/node_modules (20ms)
Scanning folders for symlinks in /app/node_modules (18ms)

Cannot find module 'react-native/packager/transformer'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
"react": "16.0.0-alpha.12",
"react-native": "^0.49.3",

0.46.1 is now out, please give it another go. As always, make sure to clear out your node_modules directory and run npm install again.

@ryan-burmeister I had no problems on react-native@0.45 with npm 5. This is a new problem in 0.46