snack icon indicating copy to clipboard operation
snack copied to clipboard

Vague error message (Can't resolve '') when importing package with invalid entry point

Open IjzerenHein opened this issue 3 years ago • 3 comments

Summary

Importing react-hooks-firebase causes snackager to return error:

curl "https://snackager.expo.io/bundle/react-firebase-hooks?version_snackager=true&platforms=ios,android,web"
Can't resolve '' in '/tmp/snackager/snackager/buildStatus/1/[email protected],android,web/package'

react-firebase-hooks does have a main entry in its package.json but that refers to a non existent file. The error message returned by Snackager is very vague

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

40

Reproducible demo or steps to reproduce from a blank project

curl "https://snackager.expo.io/bundle/react-firebase-hooks?version_snackager=true&platforms=ios,android,web"

IjzerenHein avatar Feb 09 '21 08:02 IjzerenHein

I don't think we can avoid this issue, but we can improve the error message. Is that a good way to solve this?

byCedric avatar Jun 01 '21 17:06 byCedric

I don't think we can avoid this issue, but we can improve the error message. Is that a good way to solve this?

Yep that sounds good enough. Something like Cannot find entry point 'build/index.js' would definitely be a lot better

IjzerenHein avatar Sep 16 '21 10:09 IjzerenHein

Is there a way to import these packages with invalid entry points? I don't think things like app.json work well on snack?

howardwu1 avatar Sep 01 '23 21:09 howardwu1