Skip to content

Create Start CLI not working with node v22.11 #3091

Description

@SelfhostedPro

Which project does this relate to?

Start

Describe the bug

When running the create start command, the following error occurs:

bun create @tanstack/start or npm create @tanstack/start

file:///private/tmp/bunx-501-@tanstack/create-start@latest/node_modules/@tanstack/create-start/dist/modules/core/index.mjs:7
import packageJson from "../../../package.json" assert { type: "json" };
                                                ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:340:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
    at #translate (node:internal/modules/esm/loader:433:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)

Node.js v22.11.0

Your Example Website or App

N/A as it's a commandline tool

Steps to Reproduce the Bug or Issue

  1. Have node v22.11.0 installed.
  2. run bun create @tanstack/start moduall

Expected behavior

I would expect it to run.

Screenshots or Videos

No response

Platform

  • OS: MacOS
  • Browser: Any
  • Version: v1.92.11

Additional context

You can get around this by passing --bun to the command if you have it installed. (ie. bun --bun create @tanstack/start)

Reason why it doesn't work is due to support for "import assertions" being removed from Node in favour of "import attributes"

(source for above available here)

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