vercel / turborepo

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

TypeError: import_fs.default.cpSync is not a function[turborepo] #2945

Closed maximveksler closed 1 year ago

maximveksler commented 1 year ago

What version of Turborepo are you using?

create-turbo@latest

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

pnpm

What operating system are you using?

Linux

Describe the Bug

m@m-inspiron5567:~/code/allbetter/turbogame$ npx create-turbo@latest

npx: installed 182 in 20.132s

>>> TURBOREPO

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

? Where would you like to create your turborepo? ./my-turborepo
? Which package manager do you want to use? pnpm

Aborting installation.
Unexpected error. Please report it as a bug:
TypeError: import_fs.default.cpSync is not a function
    at run (/home/m/.npm/_npx/223541/lib/node_modules/create-turbo/dist/index.js:328:21)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

1st time user of turborepo, not the best DX 🙋‍♂️

Expected Behavior

no error should be printed.

To Reproduce

Follow provided steps.

Reproduction Repo

No response

maximveksler commented 1 year ago
m@m-inspiron5567:~/code/allbetter/turbogame$ npx --version
6.14.17
m@m-inspiron5567:~/code/allbetter/turbogame$ node --version
v14.21.1
dragomirweb commented 1 year ago

Maybe try with a more recent version of node :)

maximveksler commented 1 year ago

Using node@18 works as expected

m@m-inspiron5567:~/code/allbetter/turbogame$ volta install node
success: installed and set node@18.12.1 (with npm@8.19.2) as default
m@m-inspiron5567:~/code/allbetter/turbogame$ npx --version
8.19.2
m@m-inspiron5567:~/code/allbetter/turbogame$ npx create-turbo@latest
Need to install the following packages:
  create-turbo@1.6.3
Ok to proceed? (y) y

>>> TURBOREPO

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

? Where would you like to create your turborepo? ./my-turborepo

? Which package manager do you want to use? npm

>>> Created a new turborepo with the following:

 - apps/web: Next.js with TypeScript
 - apps/docs: Next.js with TypeScript
 - packages/ui: Shared React component library
 - packages/eslint-config-custom: Shared configuration (ESLint)
 - packages/tsconfig: Shared TypeScript `tsconfig.json`

>>> Success! Created a new Turborepo at "my-turborepo".
Inside that directory, you can run several commands:

  npm run build
     Build all apps and packages

  npm run dev
     Develop all apps and packages

Turborepo will cache locally by default. For an additional
speed boost, enable Remote Caching with Vercel by
entering the following command:

  npx turbo login

We suggest that you begin by typing:

  cd my-turborepo
  npx turbo login

npm notice 
npm notice New major version of npm available! 8.19.2 -> 9.1.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.1.3
npm notice Run npm install -g npm@9.1.3 to update!
npm notice 
maximveksler commented 1 year ago

Maybe try with a more recent version of node :)

Yes, clearly.

However it's still under maintanace, and I'd expect the tooling to at least prompt about unsupported version of node, or best - Support all LTS under maintance node versions.

Best :+1:

tknickman commented 1 year ago

This is fixed in latest