sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

sandpack doesn't work with the latest vite

Open ocavue opened this issue 2 years ago • 1 comments

Bug report

Packages affected

  • [ ] sandpack-client
  • [x] sandpack-react

Description of the problem

I try to open a project with the latest vite and @vitejs/plugin-react in its package.json with <Sandpack/>, but I get the following error:

typeError: _promises2.default.rm is not a function

If I downgrade dependencies to the version in the template, then everything is fine. However, I need to latest vite to support some features in project so I cannot use this older vite version.

What were you doing when the problem occurred?

What steps can we take to reproduce the problem?

I created a repo to reproduce this issue: https://github.com/issueset/sandpack-vitest-bug

$ git clone https://github.com/issueset/sandpack-vitest-bug
$ cd sandpack-vitest-bug
$ pnpm install
$ pnpm dev

And you should see the same error as the following screenshot:

image

Link to sandbox: link (optional)

N/A

Your Environment

Software Name/Version
Sandpack-client version n/a
Sandpack-react version 2.6.9
Browser chrome
Operating System macOS

ocavue avatar Jun 25 '23 12:06 ocavue

@ocavue Did you find a resolution to this issue?

traviscooper avatar Apr 05 '24 15:04 traviscooper