NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.69k stars 4.8k forks source link

更新到4.0.3无法运行 #16205

Closed XiaofeiCY closed 4 months ago

XiaofeiCY commented 4 months ago

相关平台

微信小程序

复现仓库

https://github.com/XiaofeiCY/taroFormer.git 小程序基础库: 3.5.0 使用框架: Vue 3

复现步骤

项目更新到最新版本4.0.3,删掉本地的node_modules和pnpm-lock,执行 pnpm i 安装依赖后,运行 pnpm run dev:weapp 后,终端未提示任何报错,但是在微信开发者工具运行失败 报错信息: app.js错误: TypeError: n[e] is not a function at webpack_require__ (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at Object../node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js (vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js.js?t=wechat&s=1722300800333&v=c9b8cab95279abac4e7685b95720897d:3) at webpack_require (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at remoteEntry.js?t=wechat&s=1722300800333&v=05abfb0fcaf2edf68ef06e7257a00f8d:3 at Object.webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at webpack_require (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at Object../src/app.ts (app.js?t=wechat&s=1722300800333&v=98325ed2090c7295388d852b4f90e9d3:3) at webpack_require (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at app.js?t=wechat&s=1722300800333&v=98325ed2090c7295388d852b4f90e9d3:3 at Function.webpack_require__.O (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2)(env: Windows,mp,1.06.2405020; lib: 3.5.0)

TypeError: n[e] is not a function at webpack_require__ (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at Object../node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js (vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js.js?t=wechat&s=1722300800333&v=c9b8cab95279abac4e7685b95720897d:3) at webpack_require (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at remoteEntry.js?t=wechat&s=1722300800333&v=05abfb0fcaf2edf68ef06e7257a00f8d:3 at Object.webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at webpack_require (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at Object../src/app.ts (app.js?t=wechat&s=1722300800333&v=98325ed2090c7295388d852b4f90e9d3:3) at webpack_require (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2) at app.js?t=wechat&s=1722300800333&v=98325ed2090c7295388d852b4f90e9d3:3 at Function.webpack_require__.O (runtime.js?t=wechat&s=1722300800333&v=47dcb9e4cd91ceb8f04ea49d50da94d3:2)(env: Windows,mp,1.06.2405020; lib: 3.5.0)

期望结果

运行成功

实际结果

运行失败

环境信息

PS E:\work\taroFormer> taro info
👽 Taro v4.0.4

  Taro CLI 4.0.4 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 22.5.0 - C:\Program Files\nodejs\node.EXE
      npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 4.0.4 => 4.0.4
      @tarojs/components: 4.0.4 => 4.0.4
      @tarojs/helper: 4.0.4 => 4.0.4
      @tarojs/plugin-framework-vue3: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4
      @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4
      @tarojs/runtime: 4.0.4 => 4.0.4
      @tarojs/shared: 4.0.4 => 4.0.4
      @tarojs/taro: 4.0.4 => 4.0.4
      @tarojs/taro-loader: 4.0.4 => 4.0.4
      @tarojs/webpack5-runner: 4.0.4 => 4.0.4
      babel-preset-taro: 4.0.4 => 4.0.4
      eslint-config-taro: 4.0.4 => 4.0.4

补充信息

上面的版本选项无法选择最新的4.0.4,我就选择了3.3.16, 我的仓库是私人仓库,需要用的话可以私我 1141079850@qq.com

HongxuanG commented 4 months ago

试试把项目升级到4.0.4?

XiaofeiCY commented 4 months ago

标题写的不对,早上8点多更新到4.0.4,执行pnpm run dev:weapppnpm run build:weapp都运行失败,报错如上,然后开个晨会回来,9点多再试一下,一切都好了😅😅😅