Skip to content

fix(pacer-devtools): remove inline style objects to fix setStyleProperty export error#169

Open
restareaByWeezy wants to merge 1 commit intoTanStack:mainfrom
restareaByWeezy:fix-issue-131
Open

fix(pacer-devtools): remove inline style objects to fix setStyleProperty export error#169
restareaByWeezy wants to merge 1 commit intoTanStack:mainfrom
restareaByWeezy:fix-issue-131

Conversation

@restareaByWeezy
Copy link

Fixes #131

When using @tanstack/react-pacer-devtools in a Next.js application, the following error occurs during SSR:

Export setStyleProperty doesn't exist in target module
import { ..., setStyleProperty, ... } from "solid-js/web"

The root cause is that the Solid.js compiler transforms JSX inline style objects (style={{ ... }}) into setStyleProperty() calls. This function is exported from solid-js/web's browser build (web.js), but not from its server build (server.js). Since Next.js resolves solid-js/web using the server condition during SSR bundling, the function cannot be found.

To fix this, all inline style objects in the pacer-devtools components have been replaced with goober CSS classes, which is already the established pattern in this codebase. The one dynamic value (left panel width) is handled via a string-based style attribute, which the Solid compiler compiles to setAttribute rather than setStyleProperty.

Changes:

  • packages/pacer-devtools/src/styles/use-styles.ts: added min-width and max-width to the leftPanel class, added new stateHeaderRow and reductionValue classes
  • packages/pacer-devtools/src/components/Shell.tsx: replaced style object with string attribute for dynamic width, removed redundant flex: 1 (already present in rightPanel class)
  • packages/pacer-devtools/src/components/StateHeader.tsx: replaced two inline style objects with goober CSS classes

There are no visual or behavioral changes. The fix can be verified by checking that setStyleProperty no longer appears in the build output after this change.

grep -r "setStyleProperty" packages/pacer-devtools/dist/
# should return no results

…eProperty dependency

Solid.js compiler transforms `style={{ ... }}` object props into
`setStyleProperty()` calls from solid-js/web. This function only exists
in the browser build (web.js) but not the server build (server.js).
Next.js resolves solid-js/web using the server condition during SSR,
causing "Export setStyleProperty doesn't exist in target module" error.

Fix: replace all inline style objects with goober CSS classes, and use
string-based style attribute for the dynamic width value. This prevents
the Solid compiler from emitting setStyleProperty calls entirely.

Closes TanStack#131

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 6cc0ff1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@KevinVandy
Copy link
Member

I'm wondering if it's more appropriate for the devtools to be expected to be client side only rendering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

with devtools added getting export setStyleProperty was not found in module error

2 participants