我正在尝试运行从 Envato 市场购买的 Nuxt.js 3 模板,但是当我运行 npm install 时,出现以下错误。
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @nuxtjs/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/nuxt
npm ERR! dev nuxt@"3.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer nuxt@"^2.15" from @nuxtjs/[email protected]
npm ERR! node_modules/@nuxtjs/composition-api
npm ERR! @nuxtjs/composition-api@"^0.33.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/nuxt
npm ERR! peer nuxt@"^2.15" from @nuxtjs/[email protected]
npm ERR! node_modules/@nuxtjs/composition-api
npm ERR! @nuxtjs/composition-api@"^0.33.1" 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\20101\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\20101\AppData\Local\npm-cache\_logs\2023-09-20T19_07_39_414Z-debug-0.log
有人遇到过类似的问题吗?如果是的话如何解决?
您确定它是 Nuxt 3 模板吗? Nuxt 3 不支持
@nuxtjs/composition-api
,因为它是基于 Vue 3 构建的,并且附带了组合 api。