Comments (5)
请问能正常跑起来吗?
from uni-app-types.
我刚刚用 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.
能跑起来,目前错误基本都能解决
from uni-app-types.
能正常跑起来就可以。如果还是很在意依赖版本问题可以到 uni-app 仓库提 issue。
from uni-app-types.
恩好的。谢谢啦
from uni-app-types.
Related Issues (20)
- 自定义组件类型声明文件出现冲突 HOT 19
- types declare HOT 2
- 优化类型 HOT 1
- 建议增加组件 event 类型 HOT 4
- `CustomEvent` 等事件类型的讨论 HOT 5
- vscode 自动升级volar 插件导致的 uni-app-types 类型失效 HOT 8
- volar / vue-tsc@^1.6.4 该如何配置? HOT 16
- `nativeTags` Usage problem HOT 2
- volar >1.7.12 如何配置? HOT 2
- volar >= 1.8.12 标签报错 HOT 4
- vscode的uni组件都报错,不知道是哪里的问题 HOT 1
- webstorm 类型提示不出来 HOT 8
- Uni类型缺失 HOT 2
- "experimentalRuntimeMode": "runtime-uni-app" 不起作用 HOT 2
- the new version of vue-official can't support nativeTags HOT 1
- 升级 Vue 到新版本后, 类型失效 HOT 5
- webstorm 上会对模版上的 class 显示异常 HOT 2
- 如果 Volar 版本号高于 2.0.12,uni-app 自带的标签类型定义会报错 HOT 2
- [email protected](含)之后的版本失效 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uni-app-types.