turbo
turbo copied to clipboard
pnpm@7 and create-turbo@latest
What version of Turborepo are you using?
latest
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Describe the Bug
I've never used turborepo, so I thought I'd try the getting starting entry, well... running fails for pnpm@7.
I have on my box:
$ npm -g ls
/Users/me/.nvm/versions/node/v16.13.2/lib
├── @microsoft/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
$ 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? turbo-03
? Which package manager do you want to use? pnpm
>>> Creating 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/config: Shared configuration (ESLint)
- packages/tsconfig: Shared TypeScript `tsconfig.json`
Installing dependencies...
Aborting installation.
pnpm install --registry=https://registry.npmjs.org/ has failed.
I will also call out that if I try running:
$ pnpm -g ls
Legend: production dependency, optional only, dev only
/Users/me/Library/pnpm/global/5
dependencies:
nx 14.0.5
typescript 4.6.4
{machinename}:scratch-pad me$ pnpx create-turbo@latest
Packages: +160
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /Users/me/Library/pnpm/store/v3
Virtual store is at: .pnpm
Progress: resolved 160, reused 160, downloaded 0, added 160, done
/private/var/folders/w8/h8q2_7l960v4y9nt4lb75g3jj212w9/T/dlx-96755/5:
+ create-turbo 1.2.6
>>> TURBOREPO
>>> Welcome to Turborepo! Let's get you set up with a new codebase.
? Where would you like to create your turborepo? turbo-04
? Which package manager do you want to use? pnpm
>>> Creating 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/config: Shared configuration (ESLint)
- packages/tsconfig: Shared TypeScript `tsconfig.json`
Installing dependencies...
Aborting installation.
pnpm install --registry=https://registry.npmjs.org/ has failed.
Expected Behavior
I would expect the create-turbo@latest to complete without this issue:
Aborting installation.
pnpm install --registry=https://registry.npmjs.org/ has failed.
To Reproduce
To repoduce, I would say from the examples above, it's easy peasy by following the create-turbo@latest's questions.
Noting that it works without a problem if you convert to pnpm from a yarn project
So I did some poking around and found an option:
npx create-turbo@latest --use-pnpm --no-install
Doing this syntax above gives me way to get around the error, or at least have a sense of completion with this command package runs.
A couple of things to note:
- I don't have a login for vercel
- when I ran
pnpm install --registry=https://registry.npmjs.org/directly there were no issues on my box
I did try looking for a verbose / debug option to get more info, but I cannot find anything.
npx create-turbo@latest --use-pnpm --no-install got me a template, but installing failed.
~/Desktop/Projects/next-starter main*
❯ pnpm install
Scope: all 6 workspace projects
Packages: +291
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /Users/raphael/Library/pnpm/store/v3
Virtual store is at: node_modules/.pnpm
Progress: resolved 370, reused 291, downloaded 0, added 291, done
devDependencies:
+ eslint-config-custom 0.0.0 <- packages/eslint-config-custom
+ prettier 2.7.1
+ turbo 1.3.1
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
apps/docs
└─┬ next
└─┬ styled-jsx
├── ✕ missing peer @babel/core@"*"
└─┬ @babel/plugin-syntax-jsx
└── ✕ missing peer @babel/core@^7.0.0-0
Peer dependencies that should be installed:
@babel/core@">=7.0.0 <8.0.0"
apps/web
└─┬ next
└─┬ styled-jsx
├── ✕ missing peer @babel/core@"*"
└─┬ @babel/plugin-syntax-jsx
└── ✕ missing peer @babel/core@^7.0.0-0
Peer dependencies that should be installed:
@babel/core@">=7.0.0 <8.0.0"
packages/eslint-config-custom
├─┬ eslint-config-next
│ ├── ✕ missing peer typescript@>=3.3.1
│ ├── ✕ missing peer eslint@"^7.23.0 || ^8.0.0"
│ ├─┬ @typescript-eslint/parser
│ │ ├── ✕ missing peer typescript@"*"
│ │ ├── ✕ missing peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0"
│ │ └─┬ @typescript-eslint/typescript-estree
│ │ ├── ✕ missing peer typescript@"*"
│ │ └─┬ tsutils
│ │ └── ✕ missing peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
│ ├─┬ eslint-import-resolver-typescript
│ │ └── ✕ missing peer eslint@"*"
│ ├─┬ eslint-plugin-import
│ │ └── ✕ missing peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
│ ├─┬ eslint-plugin-jsx-a11y
│ │ └── ✕ missing peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8"
│ ├─┬ eslint-plugin-react
│ │ └── ✕ missing peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8"
│ └─┬ eslint-plugin-react-hooks
│ └── ✕ missing peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"
├─┬ eslint-config-prettier
│ └── ✕ missing peer eslint@>=7.0.0
└─┬ eslint-plugin-react
└── ✕ missing peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8"
Peer dependencies that should be installed:
eslint@">=7.23.0 <8.0.0 || >=8.0.0-0 <8.0.0 || >=8.0.0 <9.0.0" typescript@>=3.3.1
hint: If you want peer dependencies to be automatically installed, add "auto-install-peers=true" to an .npmrc file at the root of your project.
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.
Downgrading from pnpm 7.5.0 to pnpm 6.32.25 solved the issue for me. Could be a possible workaround for now.
Downgrading from pnpm 7.5.0 to pnpm 6.32.25 solved the issue for me. Could be a possible workaround for now.
Thank you! This works!
Can you try this again with pnpm@7? We've made some improvements recently and also added e2e tests, so it should work now! I'll re-open this issue if not.
@mehulkar
I downloaded your latest examples/with-docker and ran pnpm install which gave me a similar ERR_PNPM_PEER_DEP_ISSUES error.
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
.
└─┬ eslint-config-custom 0.0.0
├─┬ eslint-config-next 12.3.0
│ ├── ✕ missing peer typescript@>=3.3.1
│ ├── ✕ missing peer eslint@"^7.23.0 || ^8.0.0"
│ ├─┬ @typescript-eslint/parser 5.36.2
│ │ ├── ✕ missing peer typescript@"*"
│ │ ├── ✕ missing peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0"
│ │ └─┬ @typescript-eslint/typescript-estree 5.36.2
│ │ ├── ✕ missing peer typescript@"*"
│ │ └─┬ tsutils 3.21.0
│ │ └── ✕ missing peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
│ ├─┬ eslint-import-resolver-typescript 2.7.1
│ │ └── ✕ missing peer eslint@"*"
│ ├─┬ eslint-plugin-import 2.26.0
│ │ ├── ✕ missing peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
│ │ └─┬ eslint-module-utils 2.7.4
│ │ └── ✕ missing peer eslint@"*"
│ ├─┬ eslint-plugin-jsx-a11y 6.6.1
│ │ └── ✕ missing peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8"
│ ├─┬ eslint-plugin-react 7.31.8
│ │ └── ✕ missing peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8"
│ └─┬ eslint-plugin-react-hooks 4.6.0
│ └── ✕ missing peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"
├─┬ eslint-config-prettier 8.5.0
│ └── ✕ missing peer eslint@>=7.0.0
└─┬ eslint-plugin-react 7.28.0
└── ✕ missing peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8"
Peer dependencies that should be installed:
eslint@">=7.23.0 <8.0.0 || >=8.0.0-0 <8.0.0 || >=8.0.0 <9.0.0" typescript@>=3.3.1
hint: If you want peer dependencies to be automatically installed, add "auto-install-peers=true" to an .npmrc file at the root of your project.
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.
We now run tests on pnpm installation in create-turbo.
Other samples which are not configured for pnpm may require manual adjustments to the dependencies in package.json in order to satisfy peer dependencies.
I wanted to give an update last night, but didn't come to it.
I actually just needed to replace each workplace dependency, that previously specified "*" as version number, with "workspace:*" and it worked like a charm.
I'm new to both TurboRepo and PNPM. 😅
ou try this again with pnpm
This is still an issue, I'm using [email protected] and when I run pnpx create-turbo@latest fails
➜ pnpx create-turbo@latest
../../../.pnpm-store/v3/tmp/dlx-3541 | +156 ++++++++++++++++
../../../.pnpm-store/v3/tmp/dlx-3541 | Progress: resolved 156, reused 133, downloaded 23, added 156, done
>>> 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
>>> 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.
pnpm install has failed.
Thank you for your continued reports. If you encounter this issue in the future, please cd into the directory, and manually run a pnpm install. After doing so, capture any output error message and open a new issue on this repository including both the pnpm version and turbo version. I am locking this issue because the problems here are unrelated and tagging on to old issues only creates noise. Please feel encouraged to open new issues!
pnpx create-turbo@latest is working with
pnpm --version
7.24.3
If you're still seeing issue, please let us know and we'll reopen!