Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing module in sandbox from codesandbox ci #40

Open
trevor-scheer opened this issue Apr 14, 2022 · 3 comments
Open

Missing module in sandbox from codesandbox ci #40

trevor-scheer opened this issue Apr 14, 2022 · 3 comments

Comments

@trevor-scheer
Copy link

We're trying to use CS:CI for a React component for the first time and running into an interesting error that maybe y'all can help with.

Here's the base sandbox which is working fine:
https://codesandbox.io/s/npm-embeddable-explorer-zotwkv

Here's a PR which uses that sandbox in its sandbox config:
apollographql/embeddable-explorer#31

The packages in that build can be installed and work in an npm project. However, the actual sandbox fork says the module is missing. When I look into the sources, I don't see @apollo/explorer anywhere in the node_modules like I'd expect. Here's a screenshot of what I'm looking at:
image

In the original sandbox, the @apollo/explorer module does show up in the node_modules.
image

Hopefully that's helpful, let me know if you need any more info from us.

@CompuIves
Copy link
Member

Heya! I think I found the problem here. Upon checking the package (by downloading https://pkg.csb.dev/apollographql/embeddable-explorer/commit/1c097f19/@apollo/explorer and renaming it to package.tgz) I see that the package.json refers this:

"module": "dist/embeddable-explorer.esm.js",

But when looking in the dist folder, I don't see it:

image

I think that this is giving the holdup, but we should have a better error message for this. I also don't know why we don't get this error when loading the sandbox, it could be because we're resolving a bit differently, but that's something we need to double check.

@trevor-scheer
Copy link
Author

Thanks Ives, good find! We'll take a look and report back, hopefully I can just close out the issue (unless you'd like it left open as an action item for error messaging?). cc @mayakoneval

@mayakoneval
Copy link

Can confirm this was the issue, thank you! Happy to close 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants