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

执行dev:tt命令时报错插件加载失败 #16515

Closed
zhaowei97 opened this issue Sep 12, 2024 · 2 comments
Closed

执行dev:tt命令时报错插件加载失败 #16515

zhaowei97 opened this issue Sep 12, 2024 · 2 comments
Milestone

Comments

@zhaowei97
Copy link

相关平台

字节跳动小程序

小程序基础库: 无
使用框架: React

复现步骤

直接执行yarn dev:tt即可

期望结果

不报错,能够继续运行

实际结果

Error: Cannot find module 'webpack-sources'
Require stack:

  • E:\公司代码\taro\taro-front\node_modules@tarojs\plugin-platform-tt\dist\index.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\plugin-platform-tt\index.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\service\dist\utils\index.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\service\dist\Kernel.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\service\dist\index.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\service\index.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\cli\dist\cli.js
  • E:\公司代码\taro\taro-front\node_modules@tarojs\cli\bin\taro
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Function.Module._load (node:internal/modules/cjs/loader:981:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object. (E:\公司代码\taro\taro-front\node_modules@tarojs\plugin-platform-tt\dist\index.js:5:22)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Object.newLoader [as .js] (E:\公司代码\taro\taro-front\node_modules\pirates\lib\index.js:121:7)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1019:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\plugin-platform-tt\dist\index.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\plugin-platform-tt\index.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\service\dist\utils\index.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\service\dist\Kernel.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\service\dist\index.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\service\index.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\cli\dist\cli.js',
    'E:\公司代码\taro\taro-front\node_modules\@tarojs\cli\bin\taro'
    ]
    }
    E:\公司代码\taro\taro-front\node_modules@tarojs\service\dist\utils\index.js:89
    throw new Error(插件依赖 "${item}" 加载失败,请检查插件配置);

环境信息

👽 Taro v4.0.5


  Taro CLI 4.0.5 environment info:
    System:
      OS: Windows 10 10.0.19045
    Binaries:
      Node: 18.20.2 - C:\Program Files\nodejs\node.EXE       
      Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD       
      npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.5 => 4.0.5 
      @tarojs/components: 4.0.5 => 4.0.5 
      @tarojs/helper: 4.0.5 => 4.0.5 
      @tarojs/plugin-framework-react: 4.0.5 => 4.0.5         
      @tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5         
      @tarojs/plugin-platform-h5: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-jd: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-qq: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-swan: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-tt: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5 
      @tarojs/react: 4.0.5 => 4.0.5 
      @tarojs/runtime: 4.0.5 => 4.0.5 
      @tarojs/shared: 4.0.5 => 4.0.5 
      @tarojs/taro: 4.0.5 => 4.0.5 
      @tarojs/vite-runner: 4.0.5 => 4.0.5 
      babel-preset-taro: 4.0.5 => 4.0.5 
      eslint-config-taro: 4.0.5 => 4.0.5 
      react: ^18.0.0 => 18.3.1 
This was referenced Sep 14, 2024
@lihe6666
Copy link

lihe6666 commented Sep 15, 2024

+1

步骤:

  1. npx @tarojs/cli init app
    ? 请输入项目介绍 app
    ? 请选择框架 React
    ? 是否需要使用 TypeScript ? Yes
    ? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass
    ? 请选择包管理工具 pnpm
    ? 请选择编译工具 Vite
    ? 请选择模板源 Github(最新)
    ✔ 拉取远程模板仓库成功!
    ? 请选择模板 react-NutUI(NutUI + React 模板(https://nutui.jd.com/react/))

@koppthe
Copy link
Contributor

koppthe commented Sep 27, 2024

@lihe6666 可以先手动安装 webpack-sources 依赖,taro 下个版本会修复这个依赖缺失问题

@koppthe koppthe closed this as completed Sep 27, 2024
@koppthe koppthe added this to the 4.0.7 milestone Sep 27, 2024
koppthe added a commit that referenced this issue Sep 27, 2024
koppthe added a commit that referenced this issue Oct 16, 2024
* chore: 补全缺失的依赖 #16515

* feat(alipay): 新增 browserslist 配置 #16560
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

3 participants