相关平台
微信小程序
小程序基础库: 2.17.3
使用框架: React
复现步骤
打开直接编译
期望结果
正常运行
实际结果
TypeError: Function(...) is not a function
at Object. (vendors.js?t=wechat&s=1630052072971&v=51e6a5e98eaab851d9eb6bb9a6491eff:26996)
at Object../node_modules/regenerator-runtime/runtime.js (vendors.js?t=wechat&s=1630052072971&v=51e6a5e98eaab851d9eb6bb9a6491eff:26998)
at webpack_require (runtime.js?t=wechat&s=1630052072971&v=1d0d5ed55d2c0bedf0abc157370cc274:80)
at Object../node_modules/babel-runtime/regenerator/index.js (vendors.js?t=wechat&s=1630052072971&v=51e6a5e98eaab851d9eb6bb9a6491eff:867)
at webpack_require (runtime.js?t=wechat&s=1630052072971&v=1d0d5ed55d2c0bedf0abc157370cc274:80)
at Object../src/services/index.js (app.js?t=wechat&s=1630052072971&v=c5dafca5db1f8b1bd180e42b1d61ef50:423)
at webpack_require (runtime.js?t=wechat&s=1630052072971&v=1d0d5ed55d2c0bedf0abc157370cc274:80)
at Object../src/store/main.ts (app.js?t=wechat&s=1630052072971&v=c5dafca5db1f8b1bd180e42b1d61ef50:981)
at webpack_require (runtime.js?t=wechat&s=1630052072971&v=1d0d5ed55d2c0bedf0abc157370cc274:80)
at Object../node_modules/@tarojs/mini-runner/dist/loaders/wxTransformerLoader.js?!./src/app.tsx?taro&type=script&parse=ENTRY& (app.js?t=wechat&s=1630052072971&v=c5dafca5db1f8b1bd180e42b1d61ef50:30)(env: macOS,mp,1.05.2105100; lib: 2.14.1)
环境信息
👽 Taro v2.2.1
Taro CLI 2.2.1 environment info:
System:
OS: macOS 11.3.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.18.2 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 2.2.1 => 2.2.1
@tarojs/mini-runner: 2.2.1 => 2.2.1
@tarojs/mobx: 2.2.1 => 2.2.1
@tarojs/mobx-h5: 2.2.1 => 2.2.1
@tarojs/mobx-rn: 2.2.1 => 2.2.1
@tarojs/plugin-babel: 2.2.1 => 2.2.1
@tarojs/plugin-csso: 2.2.1 => 2.2.1
@tarojs/plugin-sass: 2.2.1 => 2.2.1
@tarojs/plugin-uglifyjs: 2.2.1 => 2.2.1
@tarojs/rn-runner: 2.2.1 => 2.2.1
@tarojs/router: 2.2.1 => 2.2.1
@tarojs/taro: 2.2.1 => 2.2.1
@tarojs/taro-alipay: 2.2.1 => 2.2.1
@tarojs/taro-h5: 2.2.1 => 2.2.1
@tarojs/taro-swan: 2.2.1 => 2.2.1
@tarojs/taro-tt: 2.2.1 => 2.2.1
@tarojs/taro-weapp: 2.2.1 => 2.2.1
@tarojs/webpack-runner: 2.2.1 => 2.2.1
eslint-config-taro: 2.2.1 => 2.2.1
eslint-plugin-taro: 2.2.1 => 2.2.1
nerv-devtools: ^1.5.6 => 1.5.7
nervjs: ^1.5.6 => 1.5.7
stylelint-config-taro-rn: 2.2.1 => 2.2.1
stylelint-taro-rn: 2.2.1 => 2.2.1
taro-ui: 2.3.4 => 2.3.4
3条答案
按热度按时间c90pui9n1#
在开发工具基础库2.17.3以下是可以直接运行的,
但是在2.17.3以上就直接报错了。
abithluo2#
TypeError: Function(...) is not a function
检查一下哪里用到了吧。
nwo49xxi3#
TypeError: Function(...) is not a function
检查一下哪里用到了吧。
Function("r", "regeneratorRuntime = r")(runtime); 貌似是这个地方
在/regenerator-runtime/runtime.js 下面 747行