Questions tagged [codesandbox]

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.

276 questions
3
votes
1 answer

CodeSandbox — How to fix tsserver.js errors?

I am currently getting two error in CodeSandbox every time I refresh or start a new Sandbox. I tried many things to solve without success. Has anyone come across this and managed to fix it? Error VS Code's tsserver was deleted by another…
Diego Oriani
  • 1,647
  • 5
  • 22
  • 31
3
votes
1 answer

It's not working in CodeSandbox but runs in visual studio code. why?

Here is the code that I am using. JS const clockContainer = document.querySelector('.js-clock'), clockTitle = clockContainer.querySelector('h1'); function getTime() { const date = new Date(); const minutes = date.getMinutes(); …
badbeoti
  • 33
  • 3
3
votes
1 answer

How can I use scripts in a static codesandbox template?

I have created a static codesandbox template, but can't seem to get javascript working:

Just a test

Kokodoko
  • 26,167
  • 33
  • 120
  • 197
3
votes
2 answers

Why I get this error (new Set(...)).slice is not a function?

I tried to run this code in any of the online code editors but I always get error (new Set(...)).slice is not a function Code: myarray = ['d','s', 'a']; chr_arr = [...new Set(myarray)]; why I get this error ?
zac
  • 4,495
  • 15
  • 62
  • 127
3
votes
1 answer

Running in-browser development server [like stackblitz/codesandbox]

The Question: How to run a live in-browser dev server? Context Stackblitz and CodeSandbox are two platforms that provide online IDE to develop web applications. I have a similar use case, and would need to run an in browser dev server, but there's…
3
votes
3 answers

Http request error with codeSandBox (React/Node)

I have strange error in online IDE like CodeSandBox/StackBlitz. I do a sample http request (with axios but with fetch or others the problem is the same) and try to print the response in the console. I use React for the front and node (listen port…
sayenel
  • 31
  • 4
2
votes
0 answers

How to style `Sandpack`

Overview I'm looking for the best practice when styling sandpack, I know there's the @codesandbox/sandpack/unstyled export, however this isn't a viable choice because they aren't modular enough to be interoperable with the regular styled exports. I…
SaintPreston
  • 103
  • 6
2
votes
2 answers

How to export Codesandbox project?

I can't seem to figure out why I can't download the project from Codesandbox. When I click on my project, I am redirected to this screen. Here I am working on my project but I don't see an option to export or download the project files. I have…
Ali Mustafa
  • 676
  • 3
  • 14
2
votes
0 answers

findLast and findLastIndex not working / existing in codesandbox

In codesandbox for example [1,2,3].findLastIndex(n => n === 2) has an error saying that the method findLastIndex (I've checked and the same is true for findLast) does not exist on a number array. I've tried the same with other types of arrays and…
The Truth
  • 87
  • 11
2
votes
1 answer

Vue3 Codesandbox unexpected token using