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
Failing to install npm dependencies when using self-hosted bundlerURL #37
Comments
@DeMoorJasper could you please take a look at this issue? |
Any updates on this? I tried it on another PC and still get the same errors. It's a bit odd since some libraries work with the locally hosted bundler whereas others don't. And all libraries work fine when using the CDN bundler. So it's almost like the locally hosted bundler is not the same as the CDN one. Is there another bundler that can be used in the same way and is compatible with Sandpack? |
It should be identical to using: |
If I change the bundlerUrl from my locally hosted bundler (https://github.com/codesandbox/sandpack-bundler), to |
Yes, that's what I suspected, it's a bug in the new v2 bundler, you should probably follow this guide instead for self-hosting the v1 bundler: https://sandpack.codesandbox.io/docs/advanced-usage/client#hosting-the-bundler |
How do I host the Ideally I'm looking to only host the bundler. Is the bug with Thanks. |
Hey @DeMoorJasper, is this still an issue? I assume it is fixed by now. |
Don't think we've fixed this on the new experimental bundler, but it works on the stable bundler. We're not yet sure how we're gonna fix this yet. |
Bug report
Packages affected
Description of the problem
I have this sandpack-bundler running: https://github.com/codesandbox/sandpack-bundler
In the example sandbox below, you will see I am setting the bundlerURL in the SandboxProvider.
The sandpack created doesn't actually work though due to failing to properly important the library. It works fine when I don't set bundlerURL and use the default bundler. Example of the error:
(Sometimes the error is about failing to import other stuff like
Cannot find module 'process' from '/node_modules/vfile/lib/minproc.js'
)It works fine when I try other libraries like "uuid: latest", but testing with "react-markdown: latest" has given me these errors. I've tried a couple other libraries and had issues with them too. It's like it's not doing
npm install
properly.Again I should note that if I don't define bundlerURL and use the default, it works fine.
(Side note: sandpack-client and sandpack-react seem to use a different bundler version, 1.7.0 vs 1.8.8)
Link to sandbox: link
Your Environment
The text was updated successfully, but these errors were encountered: