codesandbox / codesandbox/codesandbox-client
Function called outside component initialization
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 for this project.
- I agree to follow the 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
I get the error
Function called outside component initialization
when mounting a Svelvet component (Svelvet is a npm package)
How has this issue affected you? What are you trying to accomplish?
We use CodeSandbox to demo components to users. All demos are now broken.
To Reproduce
Import and mount a Svelvet component (see sandbox below)
Link to sandbox:
This is an example of a CodeSandbox which was working as of yesterday and today is not:
https://codesandbox.io/s/custom-nodes-forked-1ml2fb?from-embed=&file=/App.svelte
Some notes:
- The error message matches a previously reported bug: https://github.com/codesandbox/codesandbox-client/issues/6293
- The previous bug was reported fixed. However, when I looked at the CodeSandbox for the previous bug (https://codesandbox.io/s/flamboyant-pond-wohvg?file=/App.svelte) it appears to have returned; clicking on the colored div gives the error:
Function called outside component initialization
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | fd146448397b3ab1b7bdbea79579cd558c9ea02c |
| Browser | Safari Version 109.0.5414.119 (Official Build) (x86_64) |
| Operating System | macOS Ventura version 13.1 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure in the linked CodeSandbox with the Svelvet component and compare it with the previously reported issue #6293. Identify which change causes the “Function called outside component initialization” error and confirm the fix by remounting the affected demo without the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100