turbo: npx create-turbo@latest fails with `[Circular *1]` error
What version of Turborepo are you using?
1.5.6
What package manager are you using / does the bug impact?
npm, pnpm
What operating system are you using?
Linux (NixOS)
Describe the Bug
I cannot install turborepo with the create-turbo@latest installer because I get an error.
Steps to reproduce:
npx create-turbo@latest
# notice failure in output
cd my-turborepo
npm install
# Get the following error below
Also occurs in a similar way with pnpm have not yet tried yarn
Versions
npm --version
8.19.1
pnpm --version
7.13.3
node --version
v18.9.1
cat /etc/os-release
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="22.11pre416790.f634d427b02"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 22.11 (Raccoon)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="22.11 (Raccoon)"
VERSION_CODENAME=raccoon
VERSION_ID="22.11"
Expected Behavior
No error.
To Reproduce
$ npx create-turbo@latest
>>> 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`
>> Installing dependencies...
Aborting installation.
npm install has failed.
❯ ls
my-turborepo prototype
❯ cd my-turborepo
❯ npm install
npm ERR! code 1
npm ERR! path /home/ktdlr/gh/sharelane/my-turborepo/node_modules/turbo
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! node:internal/errors:484
npm ERR! ErrorCaptureStackTrace(err);
npm ERR! ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync /home/ktdlr/gh/sharelane/my-turborepo/node_modules/turbo/bin/turbo ENOENT
npm ERR! at Object.spawnSync (node:internal/child_process:1110:20)
npm ERR! at spawnSync (node:child_process:857:24)
npm ERR! at Object.execFileSync (node:child_process:900:15)
npm ERR! at validateBinaryVersion (/home/ktdlr/gh/sharelane/my-turborepo/node_modules/turbo/install.js:25:6)
npm ERR! at /home/ktdlr/gh/sharelane/my-turborepo/node_modules/turbo/install.js:308:5 {
npm ERR! errno: -2,
npm ERR! code: 'ENOENT',
npm ERR! syscall: 'spawnSync /home/ktdlr/gh/sharelane/my-turborepo/node_modules/turbo/bin/turbo',
npm ERR! path: '/home/ktdlr/gh/sharelane/my-turborepo/node_modules/turbo/bin/turbo',
npm ERR! spawnargs: [ '--version' ],
npm ERR! error: [Circular *1],
npm ERR! status: null,
npm ERR! signal: null,
npm ERR! output: null,
npm ERR! pid: 0,
npm ERR! stdout: null,
npm ERR! stderr: null
npm ERR! }
npm ERR!
npm ERR! Node.js v18.9.1
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ktdlr/.npm/_logs/2022-10-21T12_28_20_023Z-debug-0.log
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (11 by maintainers)
@rafaeltab RUN apk add --no-cache libc6-compat
I have created the nixpkgs pr here: https://github.com/NixOS/nixpkgs/pull/200788
@nathanhammond that works beautifully!
And it is even smaller than the other fix, only 124MB!
So, @kathodler, I suspect that this is a nixos/libc thing. I know nothing about nix, but I’m hoping that you do since you’re running it. 😅
Is there a fix that looks similar to what @rafaeltab describes for nix?