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

No QR code shown with run "npm start" #368

Closed
bbirtle opened this issue Aug 17, 2017 · 10 comments
Closed

No QR code shown with run "npm start" #368

bbirtle opened this issue Aug 17, 2017 · 10 comments

Comments

@bbirtle
Copy link

bbirtle commented Aug 17, 2017

Description

No QR code is shown in the terminal when running "npm start"

npm install -g create-react-native-app
create-react-app driver
cd driver
npm start

This shows the following:

Compiled successfully!

You can now view driver in the browser.

  Local:            http://localhost:3000/
  On Your Network:  http://192.168.1.108:3000/

Note that the development build is not optimized.
To create a production build, use npm run build.

Notice there is no QR code...

Environment

  • npm ls react-native-scripts:
  • npm ls react-native:
  • npm ls expo:

All three return:

driver@0.1.0 /Users/...../driver
└── (empty)

npm ERR! code 1

  • node -v:

v6.11.0

  • npm -v:

3.10.10

  • yarn --version:

-bash: yarn: command not found

  • watchman version:

-bash: watchman: command not found

  1. Operating system:

macOS Sierra
10.12.6

  1. Phone/emulator/simulator & version:

Not got to that point yet without a QR code!

@maxisawesome
Copy link

maxisawesome commented Aug 20, 2017

I got this when my phone wasn't connected to the same wifi as mine. Ubunutu and android though

Edit: I solved this with the advice from #234 on LINUX, not Mac. My bad

@denistsoi
Copy link

denistsoi commented Sep 5, 2017

npm run ios - or press q after npm start

@brunoandradebr
Copy link

It's a vs code bug, if you start your project npm start with cmd or powershell it works.

@bbirtle
Copy link
Author

bbirtle commented Dec 14, 2017 via email

@thelaith
Copy link

thelaith commented Jan 13, 2018

I have this issue as well, mine just straight up doesn't display the code - no clue why,

This is what my package.json looks like:

{

"name": "my-app",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "1.8.1",
"jest-expo": "23.0.0",
"react-test-renderer": "16.0.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^23.0.4",
"react": "16.0.0",
"react-native": "0.50.3"
}

}

Here's how it looks https://i.imgur.com/gdVnO6G.png

@bbirtle
Copy link
Author

bbirtle commented Jan 14, 2018

I ended up solving this issue. It involved working through a variety of dependancies - like installing watchman for macOS, upgrading node versions, etc. They have since added more helpful info to their Getting Started page.

Of course better output of helpful errors would be lovely but in my case it was really just carefully studying dependancies and Googling around common issues.

@bbirtle bbirtle closed this as completed Jan 14, 2018
@znwhite
Copy link

znwhite commented Jul 25, 2020

What solved this for me was deleting package-lock.json and node_modules, closing out of all expo tabs, running npm install again, and then npm start again.

@ilikebuttons
Copy link

What solved this for me was deleting package-lock.json and node_modules, closing out of all expo tabs, running npm install again, and then npm start again.

This worked for me as well. It seems to disappear on me when I do npm install <package>.

@0o10
Copy link

0o10 commented Aug 7, 2020

Thank you this was very helpful. I have been struggling with this for a while now.
It was working fine until I installed a new package as @ilikebuttons said. Deleting all modules and reinstalling works great. Thank you for saving me so much time. 👍

@Nangiro
Copy link

Nangiro commented Aug 16, 2020

What solved this for me was deleting package-lock.json and node_modules, closing out of all expo tabs, running npm install again, and then npm start again.

Just this way makes ir work again. Thx a lot

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

9 participants