GithubHelp home page GithubHelp logo

Comments (5)

ModyQyW avatar ModyQyW commented on July 19, 2024

请问能正常跑起来吗?

from uni-app-types.

ModyQyW avatar ModyQyW commented on July 19, 2024

我刚刚用 npx degit dcloudio/uni-preset-vue#vite-ts playground 克隆了一个新项目。

如果使用 npm 8 没有设置 legacy-peer-deps 为 true,根本无法安装依赖。

➜  [/Users/wurui/Documents/playground] npm i       
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"4.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"4.0.3" from @dcloudio/[email protected]
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR!   dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3061620221230002" 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! 
npm ERR! For a full report see:
npm ERR! /Users/wurui/.npm/_logs/2023-02-09T13_31_05_187Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wurui/.npm/_logs/2023-02-09T13_31_05_187Z-debug-0.log

模板使用的是 [email protected],@dcloudio/vite-plugin-uni 使用的却是 [email protected],导致依赖装不上。这属于是 uni-app 官方没处理好版本的问题。

目前建议是使用 npm i --legacy-peer-deps 或者在 .npmrc 里设置 legacy-peer-deps=true 来规避这个问题。后续会在 README 中更新相关的说明。

如果在运行过程中有实际报错而导致项目项目无法运行,请提供最小复现,否则可无视。

from uni-app-types.

IvoHu avatar IvoHu commented on July 19, 2024

能跑起来,目前错误基本都能解决

from uni-app-types.

ModyQyW avatar ModyQyW commented on July 19, 2024

能正常跑起来就可以。如果还是很在意依赖版本问题可以到 uni-app 仓库提 issue。

from uni-app-types.

IvoHu avatar IvoHu commented on July 19, 2024

恩好的。谢谢啦

from uni-app-types.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.