react-native-fast-image icon indicating copy to clipboard operation
react-native-fast-image copied to clipboard

However, this package itself specifies a main module field that could not be resolved

Open anchalarora opened this issue 3 years ago • 10 comments

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.

anchalarora avatar Dec 23 '21 09:12 anchalarora

Into your package.json need to add "prepare": "npm run build" into scripts object.

vasylnahuliak avatar Dec 25 '21 15:12 vasylnahuliak

Hi , try to delete node_modules folder and than run npm install.

Quintis1212 avatar Jul 30 '22 13:07 Quintis1212

@vasylnahuliak I tried to do as you said, but I got an error image how to fix it?

valery-lavrik avatar Aug 03 '22 07:08 valery-lavrik

@vasylnahuliak in order for the build command to work, you need to write it. But what should I write in it?

valery-lavrik avatar Aug 03 '22 08:08 valery-lavrik

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 avatar Aug 04 '22 20:08 vasylnahuliak

@vasylnahuliak
I realized that the problem is that the package is not assembled.
Here's what I decided to do:

  1. I made a fork from the plugin I need
  2. made changes to it
  3. npm run build
  4. 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?

valery-lavrik avatar Aug 07 '22 07:08 valery-lavrik

4.

@valery-lavrik are this fix the bug ?

Quintis1212 avatar Aug 07 '22 08:08 Quintis1212

@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...

valery-lavrik avatar Aug 07 '22 08:08 valery-lavrik

Any solution to this? Having a similar issue using the fabric fork.

tomgreco avatar Jun 24 '23 14:06 tomgreco

@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

valery-lavrik avatar Jun 26 '23 05:06 valery-lavrik