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

taro中使用react recoil 编译成京东小程序报错:regeneratorRuntime is not defined #11485

Closed
zhichaoren517 opened this issue Mar 20, 2022 · 3 comments
Labels
F-react Framework - React T-jd Target - 编译到京东小程序 V-3 Version - 3.x

Comments

@zhichaoren517
Copy link

相关平台

京东小程序

小程序基础库: 京东开发者工具 1.10.0
使用框架: React

复现步骤

taro项目中使用react recoil ,编译成京东小程序,只要使用recoil,必现。编译成微信小程序、h5正常运行

期望结果

正常

实际结果

app.js:2410 Uncaught ReferenceError: regeneratorRuntime is not defined
at Object. (app.js:2410)
at Object.node_modulesRecoilEsRecoilJs (app.js:12742)
at webpack_require (runtime.js:99)
at Object.node_modulesBabelLoaderLibIndexJsSrcAppTsx (app.js:188)
at webpack_require (runtime.js:99)
at Module.srcAppTsx (app.js:12986)
at webpack_require (runtime.js:99)
at checkDeferredModules (runtime.js:61)
at Array.webpackJsonpCallback [as push] (runtime.js:46)
at app.js:31
(anonymous) @ app.js:2410
node_modulesRecoilEsRecoilJs @ app.js:12742
webpack_require @ runtime.js:99
node_modulesBabelLoaderLibIndexJsSrcAppTsx @ app.js:188
webpack_require @ runtime.js:99
srcAppTsx @ app.js:12986
webpack_require @ runtime.js:99
checkDeferredModules @ runtime.js:61
webpackJsonpCallback @ runtime.js:46
(anonymous) @ app.js:31
require @ NAService.js:29928
(anonymous) @ appservice:2326

环境信息

hao5@ZBMAC-C02DV1B71  ~/Desktop/code/omni_channel_store   feature/test-page ±✚  taro info
👽 Taro v3.4.3


  Taro CLI 3.4.3 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v14.15.4/bin/yarn
      npm: 6.14.8 - ~/.nvm/versions/node/v14.15.4/bin/npm
    npmPackages:
      @tarojs/components: 3.4.1 => 3.4.1
      @tarojs/mini-runner: 3.4.1 => 3.4.1
      @tarojs/react: 3.4.1 => 3.4.1
      @tarojs/runtime: 3.4.1 => 3.4.1
      @tarojs/taro: 3.4.1 => 3.4.1
      @tarojs/webpack-runner: 3.4.1 => 3.4.1
      babel-preset-taro: 3.4.1 => 3.4.1
      eslint-config-taro: 3.4.1 => 3.4.1
      react: ^17.0.0 => 17.0.2
    npmGlobalPackages:
      typescript: 4.1.3
@taro-bot2 taro-bot2 bot added F-react Framework - React T-jd Target - 编译到京东小程序 V-3 Version - 3.x labels Mar 20, 2022
@github-actions
Copy link
Contributor

@uncle-light
Copy link

请问咋解决了

@hky301
Copy link

hky301 commented Apr 19, 2022

vue3,引入pinia,编译成京东小程序,也会这个报个错,请问你这个怎么解决的呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-jd Target - 编译到京东小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants