Skip to content

create-tsrouter-app scaffold fails out of the box with pnpm on Linux #395

Open

Description

@Emmanuel-Xs

Which project does this relate to?

Router

Describe the bug

Running pnpm install and pnpm dev on a freshly scaffolded TanStack Start project fails immediately without any modifications.

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

Steps to reproduce

  1. Scaffold a new project using the TanStack Start template
  2. pnpm install
  3. pnpm dev

Expected behavior

Expected behavior

A freshly scaffolded project should work after pnpm install with no manual fixes required.

Screenshots or Videos

No response

Platform

Environment

OS Linux x64 (Ubuntu)
Node v22.22.0
pnpm v10.30.1
@tanstack/react-start 1.162.4

Additional context

First error: esbuild postinstall fails with:

Error: Expected "0.27.3" but got ""

The scaffold pins esbuild@0.27.3 directly in dependencies, which has a broken postinstall script under Node 22.

Second error (after removing esbuild from dependencies and letting it be a transitive dep): lightningcss native binary missing:

Error: Cannot find module '../lightningcss.linux-x64-gnu.node'

pnpm's strict symlinking means the lightningcss-linux-x64-gnu optional dependency binary never gets linked into lightningcss's node/ directory.

Activity

  1. tannerlinsley commented on Apr 27, 2026

    @tannerlinsley
    Member

    This was addressed in commit 16fcd67 (fix(create): preserve pnpm build approvals across add-ons) on February 28. esbuild is no longer pinned in dependencies, and esbuild + lightningcss are listed under pnpm.onlyBuiltDependencies in the base templates so pnpm runs their install scripts. The fix is on main and just waiting on a release.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions