codesandbox / codesandbox/codesandbox-client

Error $csb___XXX is not a function

Open
#8,646 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the [Contributing Guidelines][contributing] for this project.
  • I agree to follow the [Code of Conduct][code_of_conduct] that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

A simple React sandbox importing the react-admin package fails with this error message:

TypeError
(0 , $csb___store.memoryStore) is not a function

The same code running locally works like a charm.

image

Details

I tested using various started kits (React TypeScript, bare Vite, etc), the problem persists.

The sandbox contains just this code:

import React from "react";
import { Admin, Resource, ListGuesser, EditGuesser } from "react-admin";
import apiClient from "ra-data-json-server";

const dataProvider = apiClient("https://jsonplaceholder.typicode.com");

const App = () => (
  <Admin dataProvider={dataProvider}>
    <Resource name="users" list={ListGuesser} edit={EditGuesser} />
    <Resource name="posts" list={ListGuesser} edit={EditGuesser} />
    <Resource name="comments" list={ListGuesser} edit={EditGuesser} />
  </Admin>
);

export default App;

How has this issue affected you? What are you trying to accomplish?

I'm trying to create a test sandbox for react-admin

Link to sandbox: https://codesandbox.io/p/sandbox/r2rptc

Try downloading it and installing deps: it works. But on codesandbox.io, it fails.

Your Environment
Software Name/Version
Сodesandbox codesandbox.io
Browser Chrome
Operating System MacOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure from the linked CodeSandbox, starting with src/App.tsx around line 16 and the react-admin import. Compare the sandbox dependency setup with the downloaded project, then identify why the package export resolves differently; done means the provided sandbox runs without the memoryStore TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, typescript
Domain
frontend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.