Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

官方脚手架demo npm安装方式无法运行 #16670

Open
jackieyyang opened this issue Oct 9, 2024 · 7 comments
Open

官方脚手架demo npm安装方式无法运行 #16670

jackieyyang opened this issue Oct 9, 2024 · 7 comments

Comments

@jackieyyang
Copy link

相关平台

微信小程序

小程序基础库: 3.5.5
使用框架: Vue 3

复现步骤

1.安装taro4.0.6
2.新建Vue3 JavaScript Npm Vite Github vue3-NutUI
3.npm install安装依赖 依赖冲突报错

期望结果

npm和yarn都能正常运行demo

实际结果

yarn可以正常装包运行demo,npm装包依赖冲突无法运行

环境信息

Taro CLI 4.0.6 environment info:
    System:
      OS: macOS 15.0
      Shell: 3.2.57 - /bin/sh
    Binaries:
      Node: 22.9.0 - /usr/local/bin/node
      Yarn: 1.22.22 - /usr/local/bin/yarn
      npm: 10.9.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.6 => 4.0.6 
      @tarojs/components: 4.0.6 => 4.0.6 
      @tarojs/helper: 4.0.6 => 4.0.6 
      @tarojs/plugin-framework-vue3: 4.0.6 => 4.0.6 
      @tarojs/plugin-html: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-alipay: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-h5: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-jd: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-qq: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-swan: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-tt: 4.0.6 => 4.0.6 
      @tarojs/plugin-platform-weapp: 4.0.6 => 4.0.6 
      @tarojs/runtime: 4.0.6 => 4.0.6 
      @tarojs/shared: 4.0.6 => 4.0.6 
      @tarojs/taro: 4.0.6 => 4.0.6 
      @tarojs/vite-runner: 4.0.6 => 4.0.6 
      babel-preset-taro: 4.0.6 => 4.0.6 
      eslint-config-taro: 4.0.6 => 4.0.6 
@k103hub
Copy link

k103hub commented Oct 11, 2024

遇到同样问题

This was referenced Oct 12, 2024
@jackieyyang jackieyyang changed the title 官方脚手架demo npm安装方式在新加坡无法运行 官方脚手架demo npm安装方式无法运行 Oct 14, 2024
@mf-Peace
Copy link

我也是一样的问题

@skyclouds2001
Copy link
Contributor

可以的话列下具体报错信息?

@jackieyyang
Copy link
Author

通过taro init demo初始化项目,选择如下:

Pasted Graphic

报错如下,@tarojs/plugin-framework-vue3需要 @vitejs/plugin-vue 的5.x版本。

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @tarojs/plugin-framework-vue3@4.0.6
npm error Found: @vitejs/plugin-vue@4.6.2
npm error node_modules/@vitejs/plugin-vue
npm error   dev @vitejs/plugin-vue@"^4.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional @vitejs/plugin-vue@"^5" from @tarojs/plugin-framework-vue3@4.0.6
npm error node_modules/@tarojs/plugin-framework-vue3
npm error   @tarojs/plugin-framework-vue3@"4.0.6" from the root project
npm error
npm error Conflicting peer dependency: @vitejs/plugin-vue@5.1.4
npm error node_modules/@vitejs/plugin-vue
npm error   peerOptional @vitejs/plugin-vue@"^5" from @tarojs/plugin-framework-vue3@4.0.6
npm error   node_modules/@tarojs/plugin-framework-vue3
npm error     @tarojs/plugin-framework-vue3@"4.0.6" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

尝试升级 @vitejs/plugin-vue 5.x, 报错vite版本与 @vitejs/plugin-vue 5.x冲突。

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: demo@1.0.0
npm error Found: vite@4.5.5
npm error node_modules/vite
npm error   dev vite@"^4.2.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer vite@"^5.0.0" from @vitejs/plugin-vue@5.1.4
npm error node_modules/@vitejs/plugin-vue
npm error   dev @vitejs/plugin-vue@"^5" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

找到了以前的相同问题,issue #16303,3个月前的bug了。

@yangyingbiao
Copy link

心真累啊,我也跑不起来,,vue3 + ts + nutui + vite,,已放弃了

@k103hub
Copy link

k103hub commented Nov 2, 2024

是的,感觉官方不太上心了,连官方脚手架项目都运行不起来,处理的奇慢无比

@y3342113181
Copy link

一样,服了,最基础的初始化项目都不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants