taro icon indicating copy to clipboard operation
taro copied to clipboard

安装依赖报错:没有匹配的版本@tarojs/[email protected]

Open yuyongyu08 opened this issue 1 year ago • 1 comments

相关平台

React Native

使用框架: React

复现步骤

npx @tarojs/cli init my-taro-app

期望结果

正常安装依赖,并顺利启动

实际结果

安装依赖处报错

环境信息

👽 Taro v3.6.21

  Taro CLI 3.6.21 environment info:
    System:
      OS: macOS 12.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
      Yarn: 1.22.15 - /usr/local/bin/yarn
      npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.21 => 3.6.21
      @tarojs/components: 3.6.21 => 3.6.21
      @tarojs/helper: 3.6.21 => 3.6.21
      @tarojs/mini-runner: 3.6.21 => 3.6.21
      @tarojs/plugin-framework-react: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-alipay: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-h5: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-jd: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-qq: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-swan: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-tt: 3.6.21 => 3.6.21
      @tarojs/plugin-platform-weapp: 3.6.21 => 3.6.21
      @tarojs/react: 3.6.21 => 3.6.21
      @tarojs/router: 3.6.21 => 3.6.21
      @tarojs/runtime: 3.6.21 => 3.6.21
      @tarojs/shared: 3.6.21 => 3.6.21
      @tarojs/taro: 3.6.21 => 3.6.21
      @tarojs/webpack-runner: 3.6.21 => 3.6.21
      @tarojs/webpack5-runner: 3.6.21 => 3.6.21
      babel-preset-taro: 3.6.21 => 3.6.21
      eslint-config-taro: 3.6.21 => 3.6.21
      react: ^18.0.0 => 18.2.0

补充信息

npx @tarojs/cli init myApp

👽 Taro v3.6.30

⚠ 获取 taro 全局配置文件失败,不存在全局配置文件:/Users/yuyongyu1/.taro-global-config/index.json

Taro 即将创建一个新项目! Need help? Go and open issue: https://tls.jd.com/taro-issue-helper

? 请输入项目介绍 test taro ? 请选择框架 React ? 是否需要使用 TypeScript ? No ? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass ? 请选择编译工具 Webpack5 ? 请选择包管理工具 npm ? 请选择模板源 Gitee(最快) ✔ 拉取远程模板仓库成功! ? 请选择模板 默认模板

✔ 创建项目: my-taro-app (省略...)

npm ERR! code ETARGET npm ERR! notarget No matching version found for @tarojs/[email protected]. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'my-taro-app' npm ERR! notarget

npm ERR! A complete log of this run can be found in: npm ERR! /Users/yuyongyu1/.npm/_logs/2024-05-23T09_29_40_737Z-debug.log ✘ 安装项目依赖失败,请自行重新安装!

yuyongyu08 avatar May 23 '24 10:05 yuyongyu08

查看插件版本:npm show @tarojs/plugin-platform-harmony-hybrid versions 确实不存在3.6.30版本: [ '3.6.22-nightly.7', '3.6.22-nightly.8', '3.6.22-nightly.9', '3.6.23-nightly.0', '3.6.23', '3.6.24-nightly.0', '3.6.24-nightly.1', '3.6.24-nightly.2', '3.6.24-nightly.3', '3.6.24-nightly.4', '3.6.24-nightly.5', '3.6.24-nightly.8', '3.6.24-nightly.9', '3.6.24-nightly.10', '3.6.24', '3.6.25', '3.6.26-alpha.1', '3.6.26-alpha.2', '3.6.26', '3.6.27', '3.6.28', '3.6.29', '4.0.0-alpha.0', '4.0.0-alpha.2', '4.0.0-alpha.3', '4.0.0-beta.2', '4.0.0-beta.3', '4.0.0-beta.4', '4.0.0-beta.5', '4.0.0-beta.6', '4.0.0-beta.7', '4.0.0-beta.8', '4.0.0-beta.9', '4.0.0-beta.10', '4.0.0-beta.11', '4.0.0-beta.12', '4.0.0-beta.13', '4.0.0-beta.14', '4.0.0-beta.15', '4.0.0-beta.16', '4.0.0-beta.17', '4.0.0-beta.18', '4.0.0-beta.19', '4.0.0-beta.20', '4.0.0-beta.21', '4.0.0-beta.22', '4.0.0-beta.23', '4.0.0-beta.24', '4.0.0-beta.25', '4.0.0-beta.26', '4.0.0-beta.27', '4.0.0-beta.28', '4.0.0-beta.29', '4.0.0-beta.30', '4.0.0-beta.31', '4.0.0-beta.32', '4.0.0-beta.33', '4.0.0-beta.34', '4.0.0-beta.35', '4.0.0-beta.36', '4.0.0-beta.37', '4.0.0-beta.38', '4.0.0-beta.39', '4.0.0-beta.40', '4.0.0-beta.41', '4.0.0-beta.42', '4.0.0-beta.43', '4.0.0-beta.44', '4.0.0-beta.45', '4.0.0-beta.46', '4.0.0-beta.47', '4.0.0-beta.48', '4.0.0-beta.49', '4.0.0-beta.50', '4.0.0-beta.51', '4.0.0-beta.52', '4.0.0-beta.53', '4.0.0-beta.54', '4.0.0-beta.55', '4.0.0-beta.56', '4.0.0-beta.57', '4.0.0-beta.58', '4.0.0-beta.59', '4.0.0-beta.60', '4.0.0-beta.61', '4.0.0-beta.62', '4.0.0-beta.63', '4.0.0-beta.64', '4.0.0-beta.65', '4.0.0-beta.66', '4.0.0-beta.67', '4.0.0-canary.9', '4.0.0-canary.10', '4.0.0-canary.11' ]

yuyongyu08 avatar May 23 '24 10:05 yuyongyu08

是不是 npm 指定的源没有更新,线上是有的哦 https://www.npmjs.com/package/@tarojs/plugin-platform-harmony-hybrid/v/3.6.30

koppthe avatar May 25 '24 04:05 koppthe