Codesandbox.io is an open-source online code editor supporting vanilla JS, Vue.js, Angular.js, React.js, and Preact.js. DO NOT use this tag just because your code is hosted on CodeSandbox, and your problem is otherwise unrelated to the CodeSandbox site.
Questions tagged [codesandbox]
276 questions
0
votes
1 answer
Why is my synchronous code executing asynchronously?
I'm trying to run some synchronous function which should wait for a certain time and then return control. But for some reason, it keeps executing asynchronously, or at least that's how it looks.
This is the code:
function pause(ms) {
var dt = new…

Ruben Lemiengre
- 104
- 8
0
votes
1 answer
Getting ENOENT error in CodeSandbox CI but not in GitHub Actions or locally
I'm trying to put together a GitHub PR for the react-querybuilder library, but my CodeSandbox CI job is failing with the following message:
{ [Error: ENOENT: no such file or directory, copyfile '/tmp/7f429ec0/react-querybuilder-v4.0.0-beta2.tgz' ->…

Jake Boone
- 1,090
- 1
- 11
- 19
0
votes
1 answer
is it possible to run a unit test command in codesandbox
I added a simple unit test file in codesandbox, this is the project link: https://codesandbox.io/s/muddy-cherry-z9of7?file=/package.json, then I want to use this command to run the unit test:
stanbul cover _mocha ./test/demo.js
but I found the…

Dolphin
- 29,069
- 61
- 260
- 539
0
votes
2 answers
My javascript-code works perfectly on CodeSandbox but not on VisualStudio
So I have created a folder in VS code with an HTML, JS and CSS file, when I open it in the browser it gives me this error in the console:
script.js:21 Uncaught TypeError: Cannot set properties of null (setting 'innerHTML') at…

Anita
- 3
- 3
0
votes
1 answer
Getting a three.js demo to work on codesandbox?
I'm trying to get a 3js demo to work on codesandbox, or codepen or jsfiddle (any is fine). I think the issue is perhaps that the script is module based, but I'm not sure what to google.
This is the demo I want to copy onto one of these…

StephD
- 266
- 3
- 20
0
votes
1 answer
Unable to replicate react-table CodeSandbox: API error on localhost
I'm trying to integrate this following CodeSandbox project into my own project. Upon navigating to the Example component, however, I'm getting a 404 error: Error: Request failed with status code 404. The API is querying the following endpoint:…

mmz
- 1,011
- 1
- 8
- 21
0
votes
0 answers
codesandbox.io Invalid SSL Certificate
https://codesandbox.io/ seems to have an invalid SSL Cert or so my browser suggests. As such, my companies proxy services are blocking this site. Anyone have any info on why this is happening or who we could reach out to to get this resolved?

rkever
- 874
- 9
- 10
0
votes
1 answer
Error using userEvent with React Testing Library and react-select AsyncSelect (but only in CodeSandbox?)
I created this CodeSandbox so I could demonstrate a problem with related code (the onChange not firing in a test):
https://codesandbox.io/s/festive-tree-xkw8s?file=/src/App.test.js
However in CodeSandbox I can't even get that far because as soon as…

Mark Fraser
- 3,160
- 2
- 29
- 48
0
votes
1 answer
Why Images Not Loading - CodeSandbox
Please take a look at my CodeSandbox to find reason(s) why images not loading, as well as what should be mindful way to fix it. Thanks.
user15299728
0
votes
1 answer
React Button Reset Filters method to clear out info
I have a todo list fetching this endpoint
I have implemented some filters
Search for title
Toggling the todos completed and not
Multiple select filters for id
I am now implementing the reset filters, which is refetching the todos list, this the…

Koala7
- 1,340
- 7
- 41
- 83
0
votes
1 answer
CodeSandbox - PostCSS received undefined instead of CSS string
I've uploaded a React project to CodeSandbox locally using the codesandbox ./ terminal command.
CodeSandbox project link here.
In the pane to view the project it's throwing the error, "PostCSS received undefined instead of CSS string". Because of…

infused
- 79
- 10
0
votes
1 answer
React Multiselect checkbox filtering data
I have an application retrieving a list of todos from this endpoint
I have built a CheckBoxDropDown component to select the id of each todo
In the CheckBoxDropDown.js component i am passing as prop the function onChange
const handleChange = (event)…

Koala7
- 1,340
- 7
- 41
- 83
0
votes
3 answers
React - Make search and filter work on a given data at same time irrespective of the order of change
I am retrieving a list of data and search for a title name from a list of todos, then i have built with Switch Material UI a component to toggle the todos that are completed and not.
You can see the full demo here =>…

Koala7
- 1,340
- 7
- 41
- 83
0
votes
3 answers
React Switch Toggle to flag elements completed and not in Todo list
I am using Switch Material UI Component to filter the between the tasks completed and not completed in my list.
See the demo codesandbox
I can switch the elements completed but the problem is that i can not switch back to the not completed when i…

Koala7
- 1,340
- 7
- 41
- 83
0
votes
0 answers
React on Codesandbox - Material-UI refuses to render
I was following a YouTube tutorial on how to create a login page using Material-UI, with some modifications. However, either way I do it, the page refuses to render. I am doing it on Codesandbox. I would like to know, is there anything I am doing…

Pink Jazz
- 784
- 4
- 13
- 34