Error: Cannot find entry file ./node_modules/react-native-scripts/build/bin/crna-entry.js in any of the roots: - react-native

I keep receiving this error when running my App.js for React Native that was working perfectly well before I attempted installing Victory charts. Somehow something broke and after over three hours of work I am unable to figure out a solution. I have tried everything I could find on the web including uninstalling watchman, reinstalling watchman, reverting to React Native 0.55.4, some other recommended commands. Nothing is working.I am so confused.

$ yarn add react-native-scripts
This helped.

I think the other library may hurt the installation part of your package. To solve this issue on IOS you need to add its library like below:
First do 'yarn add react-native-scripts'. In the case that it dose't work continue other steps.
1-Go to the node module of your project and find the package folder and find the ios file inside it.
2- Then drag it into ‘library’ section of your xcode. (It is the subset of your project folders)
3- Then go to ‘build phase’ and in the ‘Link binary with libraries’ add it there by clicking on the plus sign
4- Then in some cases you need to add the correct path of the ios file inside your node module in the xcode. To do that you should go to ‘build setting’ section in the xcode and search header there. Then you need to add the path there below other paths.
5- Then clear everything (cmd+shift+k) and then finally compile it.
I hope it works for you.

In my case the "crna-entry.js" file does exist in the roots and my project should work (nothing have been modified from last time when it does work).
After hours searching, finally I figured out the reason:
the packager's directory checking is case-sensitive and in windows terminal the drive "c:/" will not be auto-corrected to "C:/" which will lead to error.
Hope this will help someone who gets the same error.
Below is the full error message:
The development server returned response error code:404 Cannot find
entry file node_modules/react-native-scripts/build/bin/crna-entry.js
in any of the roots:

Related

react-native-config not working (Empty Config in both OS)

I'm really struggling with what seems like a very primitive error. I have installed react-native-config and when console.logging the Config object it returns {}.
The problem occurs both on android and iOS and it doesn't seem to be a linking issue because (even though RN 71.3 doesn't require manual linking) when following the steps to link manually on android I got an error saying RNCConfigPackage already linked.
This is a simplified version of my code:
import Config from 'react-native-config';
console.log(Config);
And this is what my .env file looks like:
REACT_APP_STAGE=development
TEST=ThisIsATest
ANOTHER_TEST=ThisIsAnotherTest
Debugging attempts
I have already tried:
Running gradlew clean and pod install (even though it's not a platform specific issue)
Run with ENVFILE=.env react-native run-android to hard code the env file
I understand that this is very limited information in order to debug the issue but any direction and help is appreciated including any approach you would follow to debug.
EDIT: The Config appeared in the end but is very late to update, an issue more people seem to be facing, I have used react-native-dotenv instead.

how to solve module build failed after changing file extension ( *.ts => *.tsx )?

after changing a specific file's extension from .ts to .tsx I get:
Compiled with problems:X
ERROR in ./src/components/SomeComp/someFile.ts
Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, open '.../someFile.ts'
ERROR
No files matching 'C:\Users...\src\components\SomeComp\someFile.ts' were found.
it has happened recently and somehow figured out on its own,
then i switched branches and when returned it happened again
I tried what was suggested here, clearing the browser cache How to get Chrome to reload source maps?
also restarted the react dev server couple of times
but still it tries to find the file with the old .ts extension...
searched as much as I could but didn't find a solve...
edit:
after changing the extension back and forth and restarting the dev server it has figured out, but I would still love to know what was happening and what perhaps what should be done to handle this situation correctly in the future

How to fix relative module error for a newly created nuxt.js app with starter template?

I tried to create a nuxt app with the guide from the official website, chose default options because I wanted the starter template but on running npm run dev, I keep encountering the error:
This relative module was not found:
* ./components/nuxt-error.vue in ./.nuxt/index.js
I've tried searching about it but I couldn't find any useful resource/fix. I've also tried vue init nuxt-community/starter-template for the installation but I still get the same error.
Any fixes?
So I found a solution. I couldn’t figure out the error because the nuxt-error.vue file was actually imported correctly. Turns out “npm” installations have been giving me issues (had issues with TailwindCSS too).
So if you ever encounter this error on loading the base nuxt app, recreate the project using “yarn” instead. Works like magic!
This Error basically means, that in one of your files you are trying to import another file with the relative path of ./components/nuxt-error.vue but no file with this path exists.
However
I just read that vue init nuxt-community/starter-template is deprecated and no longer maintained. Instead of fixing this Error you should restart your project with npx create-nuxt-app <yourAppName>. https://github.com/nuxt-community/starter-template

iterator_adapter.hpp file not found

In our react-native app, we're using cocoapods. After the usual set up for a new computer, including cloning the repo, installing node_modules installing and updating pods, then launching the app, I get the dreaded message Print: Entry, ":CFBundleIdentifier", Does Not Exist.
The actual error is
fatal error: 'boost/iterator/iterator_adapter.hpp' file not found
#include <boost/iterator/iterator_adapter.hpp>
I looked on the RN issues page. I found this. None of the
suggested fixes worked for me.
No one in my department has been able to resolve this.
I've recloned the source and reloaded/updated the pods multiple times.
No one else but me is experiencing this issue including folks that joined with the department with me.
I have literally run out of ideas.
EDIT: I checked another app source I have and it appears that I should have a /third-party folder. It does not. I think that this is one of those wonky problems where the RN script doesn't complete. Any thoughts?
EDIT: After reinstalling pods and building the app in Xcode, I noticed a typo in the include statement in the BitIteratorDetail.h file. It reads:
#include <boost/iterator/iterator_adaptor.hpp>,
but the filename is actually iterator_adapter.hpp. However, correcting the typo did not resolve the problem. I still get a file not found error.

React Native Android fails: error 3

Hope you could help me here:
I'm currently building an app which I created through CRNA and then ejected. I get the ios version right on but I'm currently struggling a lot with the android version.
When running react-native run-android all I can get is the following error:
Error type 3
Error: Activity class {com.myapp/com.myapp.MainActivity} does not exist.
I've checked app/build.gradle, app/src/main/AndroidManifest.xml, app/src/main/java/com/myapp/MainActivity.java and app/src/main/java/com/myapp/MainActivity.java for name errors on package. I've tried moving from com.myapp to com.mebius.myapp and com aswell.
Seems this comes from the only plugin I'm using. I'm keeping on the investigation
Any hints?
There are 3 possible reasons for the android app build fails to make
1. You need to define sdk path in android/local.properties
if local.properties doesn't place then make a file names with that
add
sdk.dir = home/user/AndroidApp/local/Sdk
You can match with their system path..
2. Your genymotion or avd must enable with the android studio
3. You must have to go with the following command
npm start
in new terminal .
Please go through with it.
Thanks
Actually I had a problem with my gradle config which look like:
include ':react-native-sensors'
project(':react-native-sensors').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sensors/android')
rootProject.name = 'accelapp'
I needed to add: include ':app'
I don't know if it's due to the process of ejecting from CRNA or if it's due to react-native link react-native-sensors though.
EDIT After some investigation, I couldn't reproduce this issue. This leads me to say it was a faulty copy/paste...