gpt4 book ai didi

reactjs - Strapi安装过程依赖安装报错

转载 作者:行者123 更新时间:2023-12-03 16:47:04 32 4
gpt4 key购买 nike

最近我尝试使用“npx”将 Strapi 安装到我的 Windows 计算机上。但是当依赖项更新如下时我收到一个错误。我尝试卸载并安装 knex 但它没有用。我该如何解决这个问题?

strapi-app>npx create-strapi-app . --quickstart
Creating a new Strapi application at D:\E-LEARNING\React Js\projects\strapi-app.

Creating a quickstart project.
Creating files.
Error while installing dependencies:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: strapi-app@0.1.0
npm ERR! Found: knex@0.19.5
npm ERR! node_modules/knex
npm ERR! knex@"<0.20.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer knex@"^0.20.0" from strapi-connector-bookshelf@3.4.1
npm ERR! node_modules/strapi-connector-bookshelf
npm ERR! strapi-connector-bookshelf@"3.4.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\user\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\user\AppData\Local\npm-cache\_logs\2021-01-12T10_28_05_191Z-debug.log

Keep trying!

Oh, it seems that you encountered errors while installing dependencies in your project.
Don't give up, your project was created correctly.
Fix the issues mentionned in the installation errors and try to run the following command:

cd D:\E-LEARNING\React Js\projects\strapi-app && npm install

npm ERR! code 1
npm ERR! path D:\E-LEARNING\React Js\projects\strapi-app
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-strapi-app . --quickstart

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2021-01-12T10_28_07_219Z-debug.log

最佳答案

Strapi 显然只支持 Node v14(当前的 LTS)。切换到那个版本(NVM?)然后再试一次。

关于reactjs - Strapi安装过程依赖安装报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65682574/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com