Skip to content

[Bug] Does not work on CodeSandbox for iPadOS #4

@jamesplease

Description

@jamesplease

This may be a bug with the template, or a problem specific to iPadOS. I’m not sure.

Steps to reproduce:

  1. Install the Codesandbox app on iPadOS
  2. Create a new Sandbox
  3. Choose the React + Vite template
  4. Run the command to install the deps
  5. Wait for the deps to install
  6. Run the dev command
  7. Observe the following error:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /private/var/mobile/Containers/Data/Application/20FF0B6C-3ADA-4435-979F-94D5E5EFB1A5/Documents/sandboxes/4knv8u/src/node_modules/vite/bin/vite.js
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1192:13)
    at Module.load (internal/modules/cjs/loader.js:1009:32)
    at Function.Module._load (internal/modules/cjs/loader.js:903:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at MessagePort.<anonymous> (internal/main/worker_thread.js:167:24)
    at MessagePort.emit (events.js:321:20)
    at MessagePort.onmessage (internal/worker/io.js:78:8)

Two asides:

  • I’d love to see a CRA template in the default list. I recognize that CRA is not new and fancy, but it’s provided a consistent and reliable experience for years, and many devs continue to use it. Esp. for quick things like what someone might use Codesandbox for (vs. a full app). Or perhaps a way for users to create their own templates that appear in the “New Sandbox” modal.

  • I tried testing on the web version, but it seems Codesandbox requires full read/write access to public/private repos, even to create a Vite+React Sandbox. I’m not interested in giving this app those full perms, so I wasn’t able to test it. Perhaps ther are technical reasons preventing you from doing this, but I’d encourage you to consider a version of CS that does not require full read/write access. I know it’s required for Projects, but many people may wish to only use Sandboxes.

Thanks for reading!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions