dword-design/nuxt-route-meta

npm install error

atlansien opened this issue · 4 comments

nuxt: 2.15.8
node: 16.0.0
npm: 7.10.0

$ npm install nuxt-route-meta
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: typescript@4.7.3
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.2
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.1.1" from @nuxt/typescript-build@2.1.0
npm ERR!     node_modules/@nuxt/typescript-build
npm ERR!       dev @nuxt/typescript-build@"^2.1.0" from the root project
npm ERR!   peerOptional typescript@">=4.4.4" from pinia@2.0.14
npm ERR!   node_modules/pinia
npm ERR!     peer pinia@">=2.0.14" from @pinia/nuxt@0.1.9
npm ERR!     node_modules/@pinia/nuxt
npm ERR!       @pinia/nuxt@"^0.1.9" from the root project
npm ERR!     pinia@"^2.0.14" from the root project
npm ERR!   3 more (ts-jest, ts-loader, tsutils)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! nuxt-route-meta@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typescript@4.2.4
npm ERR! node_modules/typescript
npm ERR!   peer typescript@"~4.2" from nuxt-route-meta@2.3.4
npm ERR!   node_modules/nuxt-route-meta
npm ERR!     nuxt-route-meta@"*" 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\username\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\username\AppData\Local\npm-cache\_logs\2022-06-28T09_03_54_488Z-debug.log

npm install nuxt-route-meta --legacy-peer-deps but

 ERROR  Cannot find module 'typescript'                                                           17:27:45
Require stack:
- C:\Users\username\Documents\apps\project\node_modules\nuxt-route-meta\dist\index.js 
- C:\Users\username\Documents\apps\project\node_modules\@nuxt\core\dist\core.js       

  Require stack:
  - node_modules\nuxt-route-meta\dist\index.js
  - node_modules\@nuxt\core\dist\core.js
  at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
  at Function.Module._load (node:internal/modules/cjs/loader:773:27)
  at Module.require (node:internal/modules/cjs/loader:1012:19)
  at require (node:internal/modules/cjs/helpers:93:18)
  at extractMeta (node_modules\nuxt-route-meta\dist\index.js:68:20)
  at Object.parseRoutes (node_modules\nuxt-route-meta\dist\index.js:149:57)
  at next (node_modules\@nuxt\utils\dist\utils.js:659:27)
  at Object.extendRoutes (node_modules\@nuxt\utils\dist\utils.js:674:12)
  at Builder.resolveRoutes (node_modules\@nuxt\builder\dist\builder.js:546:56)
  at async Promise.all (index 1)
  at async Builder.generateRoutesAndFiles (node_modules\@nuxt\builder\dist\builder.js:375:5)
  at async Builder.build (node_modules\@nuxt\builder\dist\builder.js:319:5)
  at async Object._buildDev (node_modules\@nuxt\cli\dist\cli-dev.js:107:5)
  at async Object.startDev (node_modules\@nuxt\cli\dist\cli-dev.js:65:7)
  at async Object.run (node_modules\@nuxt\cli\dist\cli-dev.js:52:5)
  at async NuxtCommand.run (node_modules\@nuxt\cli\dist\cli-index.js:413:7)

Having same issue

@MxGutierrez Where does your typescript@4.7.3 come from? In @nuxt/typescript-build it's "typescript": "~4.2".

It's also from @nuxt/typescript-build

@MxGutierrez Should be fixed. It was from other dependencies.