However, this package itself specifies a main module field that could not be resolved
In package.json I have added : "@stevenmasini/react-native-fast-image": "https://github.com/anchalarora/react-native-fast-image.git"
But In get following error
Error: While trying to resolve module @stevenmasini/react-native-fast-image from file /Users/ancarora/Documents/myrepo/packages/mobileapp/src/components/features/shopByProfile/PLP/TopMatchingProds.jsx, the package /Users/ancarora/Documents/myrepo/packages/mobileapp/node_modules/@stevenmasini/react-native-fast-image/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/ancarora/Documents/packages/mobileapp/node_modules/@stevenmasini/react-native-fast-image/dist/index.cjs.js. Indeed, none of these files exist:
Can anyone please help me to resolve this issue.
Into your package.json need to add "prepare": "npm run build" into scripts object.
Hi , try to delete node_modules folder and than run npm install.
@vasylnahuliak I tried to do as you said, but I got an error
how to fix it?
@vasylnahuliak in order for the build command to work, you need to write it. But what should I write in it?
in order for the build command to work, you need to write it. But what should I write in it?
You need to add this line into your fork (not in your project)
@vasylnahuliak
I realized that the problem is that the package is not assembled.
Here's what I decided to do:
- I made a fork from the plugin I need
- made changes to it
- npm run build
- How to upload the now assembled package to github so that it is installed from there as a normal package? so that it doesn't need to be collected after cloning?? After all, after the rpm run build command, the guide does not see any files to download. Why? How to pour an already assembled package into the github?
4.
@valery-lavrik are this fix the bug ?
@Quintis1212 Yes, @vasylnahuliak I suggested what should be done and it worked. But in my case, this did not help because in order for everything to work, the module needs to be assembled BEFORE filling in github and not after...
Any solution to this? Having a similar issue using the fabric fork.
@tomgreco the problem turned out to be something else. I just had to choose another repository for pharma. Here's what I got
https://github.com/valery-lavrik/react-native-fast-image