codesandbox / codesandbox/codesandbox-client

Function called outside component initialization

Open
#7,417 1 comment 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🎒 Bundler bug
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:

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.