codesandbox/sandpack

Error: "Cannot create property 'message' on string 'Checksum does not match'" when using proxy

Opened this issue · 0 comments

Bug report

Packages affected

  • sandpack-client
  • sandpack-react

Description of the problem

What were you doing when the problem occurred?

Trying to setup the nest app dir example with a proxy

What steps can we take to reproduce the problem?

  1. use the examples from this repo.
  2. edit the proxyconfig to match your scope (replacing codesanbox with mycompany)
  3. edit the UI to match the config
"use client";

import { Sandpack } from "@codesandbox/sandpack-react";
/**
 * The only reason this is a separate import, is so
 * we don't need to make the full page 'use client', but only this copmponent.
 */
export const SandpackComponent = () => {
  return (
    <>
      <Sandpack
        customSetup={{
          dependencies: { "@mycompany/design-system": "0.0.1" },
          npmRegistries: [
            {
              proxyEnabled: false,
              enabledScopes: ["@mycompany"],
              limitToScopes: true,
              registryUrl: "http://localhost:4000",
            },
          ],
        }}
        template="react-ts"
      />
    </>
  );
};
  1. Error happens:
    image

Some more context:

  • On the Verdaccio UI, the package is present and available versions are listed correctly
  • Example without the proxy config works fine.

Your Environment

Software Name/Version
Sandpack-client version 2.14.4
Sandpack-react version 2.14.4
Browser Chrome last version
Operating System macOS 14.5