Skip to content

Failing to install npm dependencies when using self-hosted bundlerURL #37

@zaini

Description

@zaini

Bug report

Packages affected

  • sandpack-client
  • sandpack-react

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:

image

(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

Software Name/Version
Sandpack-client version
Sandpack-react version 1.0.0 and also tried 1.8.8
Browser Chrome
Operating System MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions