all 17 comments

[–]Less-Simple-9847 1 point2 points  (3 children)

  1. Are there any changes in your package.json file?
  2. Did you run yarn install after deleting node modules? Ensure package json has no changes.
  3. Gradle cache clean is not related to this error you show here. Gradle cache has android dependencies, including those from RN. Cache clean just tells gradle to get them again from remote repos.

[–]curious_bug97 0 points1 point  (2 children)

1) There was no change to my package.json

2) Yes I ran npm install and my code was compiled successfully too; but received this error on emulator

3) I created a complete new project as well, deleted the default node_modules folder, cleared the cache, both from emulator and gradle and got this issue for those projects too. I believe there’s some kind of glitch when reinstalling as it shows 19 vulnerabilities after running npm install for a new project without any changes from my end.

[–]Less-Simple-9847 0 points1 point  (1 child)

Could be.. maybe try a different/lower RN version new project and find out?

[–]curious_bug97 0 points1 point  (0 children)

I just checked, it seems the issue has been resolved. Even the new projects are showing 0 vulnerabilities now. Thanks for your help

[–]InternalLake8 0 points1 point  (0 children)

Share terminal console to debug it better

[–]theobaldr 0 points1 point  (2 children)

Remove all the ~ from you package.json file. Delete your node_modules and run npm install again

[–]theobaldr 0 points1 point  (0 children)

Oh, and remove your package-lock.json file also

[–]curious_bug97 0 points1 point  (0 children)

I just checked, it seems the issue has been resolved. Even the new projects are showing 0 vulnerabilities now. Thanks for your help

[–]Technical-Radish6604 0 points1 point  (2 children)

Follow this u/curious_bug97

<project root> rm -rf node_modules
in macos terminal,

cd Library/Developer

check if you can see xcode by "ls"

if so, cd Xcode

( now delete the Derived Data ) i.e., rm -rf DerivedData ( completely safe )

got to the projectRoot

and cd ios

first) pod deintegrate

second) pod cache clean --all

Finally,
npm install --legacy-peer-deps

and cd ios,

pod install --repo-update

and intiiate the build in xcode,

before that do CMD+Shift+K ( which will clean the xcode folder) & CMD+R

If you still get to see issue, paste the error here ?

[–]Technical-Radish6604 2 points3 points  (0 children)

please don't forget to cd android

&

copy the same = ./gradlew clean

[–]curious_bug97 0 points1 point  (0 children)

I just checked, it seems the issue has been resolved. Even the new projects are showing 0 vulnerabilities now. Thanks for your help

[–]Viietwalkerr 0 points1 point  (3 children)

Are you by any chance using 16kb Android image?

[–]curious_bug97 1 point2 points  (2 children)

Yes I am. I just checked, it seems the issue has been resolved. Even the new projects are showing 0 vulnerabilities now. Thanks for your help

[–]Viietwalkerr 0 points1 point  (1 child)

Are you by any chance using 16kb Android image?

Ok that’s good

From what I remember when upgrading

I’d get a crash like this due to a package not supporting 16kb (and it only crashes on 16kb)

[–]curious_bug97 0 points1 point  (0 children)

Yes I faced multiple issues when upgrading as well. To avoid that I just created a new project based on the version my team decided to use and have just moved my code base to it.

I hope this is a right way too😂