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

升级3.6.2,百度编译运行报错 #13590

Open
jackajin opened this issue Apr 6, 2023 · 2 comments
Open

升级3.6.2,百度编译运行报错 #13590

jackajin opened this issue Apr 6, 2023 · 2 comments
Labels
F-react Framework - React question Further information is requested T-swan Target - 编译到百度小程序 V-3 Version - 3.x

Comments

@jackajin
Copy link

jackajin commented Apr 6, 2023

相关平台

百度小程序

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

复现步骤

正常run build 运行,
打包成功生成dist文件
运行在百度平台报错,微信平台可以正常运行

期望结果

能直接运行

实际结果

[Module Factory] modular 288 execution fail:
  Cannot set property default of #<Object> which has only a getter
  TypeError: [Module Factory] modular 288 execution fail:
  Cannot set property default of #<Object> which has only a getter
    at Object.node_modulesTarojsComponentsVirtualListIndexJs (http://127.0.0.1:56809/output/app.js:27153:31)
    at __webpack_require__ (http://127.0.0.1:56809/output/app.js:34807:43)
    at Object.srcComponentsBaseBaseVirtualListIndexTsx (http://127.0.0.1:56809/output/app.js:10673:1448)
    at __webpack_require__ (http://127.0.0.1:56809/output/app.js:34807:43)
    at Object.srcComponentsBaseIndexTs (http://127.0.0.1:56809/output/app.js:10690:9331)
    at __webpack_require__ (http://127.0.0.1:56809/output/app.js:34807:43)
    at Object.srcComponentsIndexTs (http://127.0.0.1:56809/output/app.js:10702:9810)
    at __webpack_require__ (http://127.0.0.1:56809/output/app.js:34807:43)
    at Object.srcUtilsCanvasIndexTs (http://127.0.0.1:56809/output/app.js:11716:1208)
    at __webpack_require__ (http://127.0.0.1:56809/output/app.js:34807:43)
  ext msg: {}

​ [Lifecycle Fail] Call Page.onInit fail: 
 Cannot read properties of null (reading 'mount')
  TypeError: [Lifecycle Fail] Call Page.onInit fail: 
 Cannot read properties of null (reading 'mount')
    at mount (http://127.0.0.1:56809/output/app.js:33285:24)
    at u.onInit (http://127.0.0.1:56809/output/app.js:33299:11)
    at e.value (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:646993)
    at e.value (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:635495)
    at e.page.viewLoaded.on.eventListeners.page.viewLoaded (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:636385)
    at a.value (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:269812)
    at e.value (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:636095)
    at e.value (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:631660)
    at loadSuccess (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:667789)
    at m (file:///Users/ajin/Library/Application%20Support/SwanIDE/cli/vendor/swan-core/3.660.3/master/index.js:1:453354)
  ext msg: {"methodParams":{}}

环境信息

Taro CLI 3.6.2 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
      Yarn: 1.22.11 - /usr/local/bin/yarn
      npm: 8.19.3 - ~/.nvm/versions/node/v16.19.1/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.2 => 3.6.2 
      @tarojs/components: 3.6.2 => 3.6.2 
      @tarojs/plugin-framework-react: 3.6.2 => 3.6.2 
      @tarojs/plugin-mini-ci: 3.6.2 => 3.6.2 
      @tarojs/plugin-platform-swan: ^3.6.4 => 3.6.4 
      @tarojs/plugin-platform-weapp: 3.6.2 => 3.6.2 
      @tarojs/react: 3.6.2 => 3.6.2 
      @tarojs/runtime: 3.6.2 => 3.6.2 
      @tarojs/taro: 3.6.2 => 3.6.2 
      @tarojs/webpack5-runner: 3.6.2 => 3.6.2 
      babel-preset-taro: 3.6.2 => 3.6.2 
      eslint-config-taro: 3.6.2 => 3.6.2 
      react: 18.2.0 => 18.2.0 
@ZakaryCode ZakaryCode added V-3 Version - 3.x F-react Framework - React T-swan Target - 编译到百度小程序 labels Apr 6, 2023
@xuanzebin
Copy link
Member

没有复现,麻烦升级到 3.6.4 重新试一试,如果还有问题,请提供可以复现问题的 demo,以便排查~

@TheKonka TheKonka added the question Further information is requested label Apr 19, 2023
@adamgogogo
Copy link

adamgogogo commented Dec 6, 2023

3.6.2 H5 的 virtualList 也是报错,项目也暂时没法升级:

module.exports.default = VirtualList4.default;

这是详细报错:
TypeError: Cannot set property default of #<Object> which has only a getter at node_modules/@tarojs/components/virtual-list/index.js (http://localhost:10086/chunk/vendors-node_modules_taro_h5_prebundle_tarojs_components_virtual-list_js.js:1105:32) at __require (http://localhost:10086/chunk/node_modules_taro_h5_prebundle_react_js.js:28:56) at entry:@tarojs_components_virtual-list (http://localhost:10086/chunk/vendors-node_modules_taro_h5_prebundle_tarojs_components_virtual-list_js.js:1111:26) at __require (http://localhost:10086/chunk/node_modules_taro_h5_prebundle_react_js.js:28:56) at ./node_modules/.taro/h5/prebundle/@tarojs_components_virtual-list.core.js (http://localhost:10086/chunk/vendors-node_modules_taro_h5_prebundle_tarojs_components_virtual-list_js.js:1114:64) at options.factory (http://localhost:10086/runtime.js:919:31) at __webpack_require__ (http://localhost:10086/runtime.js:36:33) at fn (http://localhost:10086/runtime.js:590:21) at ./node_modules/.taro/h5/prebundle/@tarojs_components_virtual-list.js (http://localhost:10086/chunk/vendors-node_modules_taro_h5_prebundle_tarojs_components_virtual-list_js.js:1125:9) at options.factory (http://localhost:10086/runtime.js:919:31)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React question Further information is requested T-swan Target - 编译到百度小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

5 participants