vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.39k stars 1.84k forks source link

create-turbo@latest throws exception. #1231

Closed BanksySan closed 2 years ago

BanksySan commented 2 years ago

What version of Turborepo are you using?

latest

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Windows

Describe the Bug


C:\Code\Learning\turborepo>npx create-turbo@latest
npx: installed 186 in 30.836s

>>> TURBOREPO

>>> Welcome to Turborepo! Let's get you set up with a new codebase.

Aborting installation.
Unexpected error. Please report it as a bug:
TypeError: this.breakLines(...).flat is not a function
    at ScreenManager.forceLineReturn (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\utils\screen-manager.js:172:56)
    at ScreenManager.render (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\utils\screen-manager.js:81:20)
    at InputPrompt.render (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\prompts\input.js:67:17)
    at InputPrompt._run (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\prompts\input.js:34:10)
    at Promise (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\prompts\base.js:61:12)
    at new Promise (<anonymous>)
    at InputPrompt.run (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\prompts\base.js:60:12)
    at defer (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\inquirer\lib\ui\prompt.js:105:30)
    at Observable._subscribe (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\rxjs\dist\cjs\internal\observable\defer.js:8:31)
    at Observable._trySubscribe (C:\Users\david.banks\AppData\Roaming\npm-cache\_npx\1660\node_modules\create-turbo\node_modules\rxjs\dist\cjs\internal\Observable.js:41:25)```

### Expected Behavior

Turborepo starter application created.

### To Reproduce

Run `npx create-turbo@latest` from Windows 10 CommandLine.
BanksySan commented 2 years ago

Same behaviour when explicitly stating a name.

npx create-turbo@latest turborepo-demo
BanksySan commented 2 years ago

My bad. I had an old version of npm running.