nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.75k stars 2.37k forks source link

bunx or npx create-nx-workspace results in "Unexpected token ?" error #29002

Closed Divaaaaaan closed 1 day ago

Divaaaaaan commented 1 day ago

Current Behavior

bunx create-nx-workspace --pm bun /tmp/bunx-1000-create-nx-workspace@latest/node_modules/create-nx-workspace/bin/create-nx-workspace.js:400 appName = parsedArgs.appName ?? parsedArgs.name;

Expected Behavior

Create nx workspace

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace or
  2. bunx create-nx-workspace

Nx Report

No NX report as I don't have it installed globally, just want to make a new workspace.

Failure Logs

SyntaxError: Unexpected token ?
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/tmp/bunx-1000-create-nx-workspace@latest/node_modules/create-nx-workspace/bin/index.js:4:31)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Package Manager Version

bun --version -> 1.1.36

Operating System

Additional Information

/tmp/bunx-1000-create-nx-workspace@latest/node_modules/create-nx-workspace/bin/create-nx-workspace.js:400 appName = parsedArgs.appName ?? parsedArgs.name;

Divaaaaaan commented 1 day ago

Nevermind, saw my node versoin was an old one. Changed to new node version and is working.