Skip to content

Using Typescript and Pinia throws a npm error #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DannyFeliz opened this issue Dec 3, 2021 · 1 comment
Closed

Using Typescript and Pinia throws a npm error #18

DannyFeliz opened this issue Dec 3, 2021 · 1 comment

Comments

@DannyFeliz
Copy link

DannyFeliz commented Dec 3, 2021

When scaffolding a vue app with Typescript and Pinia it throws this error:

Node: 16.13.0
OS: Windows 10 Pro
Terminal: Powershell

How to reproduce:

$ npm init vue@3

√ Project name: ... my-create-vue-app
√ Add TypeScript? ... No / Yes
√ Add JSX Support? ... No / Yes
√ Add Vue Router for Single Page Application development? ... No / Yes
√ Add Pinia for state management? ... No / Yes
√ Add Cypress for testing? ... No / Yes

Scaffolding project in C:\Users\danny\Documents\code\my-create-vue-app...

Done. Now run:

  cd my-create-vue-app
  npm install
  npm run dev
$ cd my-create-vue-app
$ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: pinia@2.0.5
npm ERR! Found: typescript@4.4.4
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"~4.4.4" from the root project
npm ERR!   peer typescript@"*" from vue-tsc@0.29.8
npm ERR!   node_modules/vue-tsc
npm ERR!     dev vue-tsc@"^0.29.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^4.5.2" from pinia@2.0.5
npm ERR! node_modules/pinia
npm ERR!   pinia@"^2.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typescript@4.5.2
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@"^4.5.2" from pinia@2.0.5
npm ERR!   node_modules/pinia
npm ERR!     pinia@"^2.0.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\danny\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\danny\AppData\Local\npm-cache\_logs\2021-12-03T14_00_21_729Z-debug.log
@DannyFeliz DannyFeliz changed the title Using Typescript and Pinia throws a npm error Using Typescript and Pinia it throws a npm error Dec 3, 2021
@DannyFeliz DannyFeliz changed the title Using Typescript and Pinia it throws a npm error Using Typescript and Pinia throws a npm error Dec 3, 2021
@haoqunjiang
Copy link
Member

Oh I didn't realize pinia has updated the typescript version requirement.
Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants