expo / snack

Expo Snack lets you run Expo in the browser.
https://snack.expo.dev
MIT License
365 stars 107 forks source link

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

Open IjzerenHein opened 3 years ago

IjzerenHein commented 3 years ago

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/react-firebase-hooks@2.2.0-ios,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"

byCedric commented 3 years ago

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

IjzerenHein commented 3 years ago

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

howardwu1 commented 1 year ago

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