question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There is no index.js in app file!

See original GitHub issue

Description

After create-react-native-app app2, I got lots of files without# # index.js in my project root file.Is this a bug? image

##reate-react-native-app version: 1.0.0 ##npm 4.0.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
ghostcommented, Sep 18, 2018

For anyone coming across this: you shouldn’t change files in node_modules, since they’ll get overwritten when you update the package.

5reactions
cyb3rsalihcommented, Aug 1, 2018

I solved! Declaration of App is in package.json ./node_modules/react-native-scripts/build/bin/crna-entry.js

There, you can see App’s default location which

var _App = require('../../../../App');

Then you can change it. I put it App.js in a src folder than it looks like this

var _App = require('../../../../src/App');

Read more comments on GitHub >

github_iconTop Results From Across the Web

There is no index.js in app file! · Issue #544 - GitHub
Description After create-react-native-app app2, I got lots of files without# # index.js in my project root file.Is this a bug?
Read more >
Newbie question - why is there no index.js file? : r/reactnative
New to react native, but not reactJS and usually when u start a new project in reactjs u get an index.js file along...
Read more >
React Native project do not have index.ios.js or index.android.js
For the latest version of React native(0.49.3), it seems that the "index.android.js" and "index.ios.js" separate entry routes are no longer ...
Read more >
How Create React App works - Frontend Armory
src/index.js. This file is special — it's your app's entry point, and it will be run as soon as your app has loaded....
Read more >
Why you should avoid index.js? - Medium
a typical index.js file can look like that, you group all exports to one ... When writing a frontend app it is common...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found