Mark elevator-opening-system as client#307
Merged
Merged
Conversation
The file imports useEffect/useRef from React, which Next.js RSC builds flag as client-only. Other core systems (e.g. elevator-runtime-system) use useFrame from @react-three/fiber and slip through, but this one needs the directive explicitly. Fixes Turbopack build failure in private-editor community app: "You're importing a module that depends on useEffect into a React Server Component module." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/core/src/systems/elevator/elevator-opening-system.tsximportsuseEffect/useReffrom React, which Next.js RSC builds treat as client-only. Adding"use client"lets consumers that build with Next (e.g. private-editor's community app) compile the package.useFramefrom@react-three/fiberand slip past RSC checks; this is the only.tsxsystem that needs the directive today.Found while building private-editor against the just-merged elevator submodule bump:
Test plan
bun run buildon a Next consumer (private-editor community) no longer fails on this file🤖 Generated with Claude Code