升级cli编译器2.0.0-32920211122002后,支付宝小程序运行报错
- 发布:2021-12-01 16:21
- 更新:2021-12-02 17:19
- 阅读:374
产品分类: uniapp/小程序/阿里
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: 12.0.1 (21A559)
第三方开发者工具版本号: 3.2.16.20211122
基础库版本号: 2.0
项目创建方式: CLI
CLI版本号: 2.0.0-32920211122002
操作步骤:
预期结果:
支付宝小程序能正常运行
支付宝小程序能正常运行
实际结果:
af-appx.worker.min.js:6 Uncaught TypeError: Function(...) is not a function
at Object.<anonymous> (vendor.js:14)
at Object.b8 (vendor.js:14)
at r (runtime.js:3)
at Object.a34a (vendor.js:14)
at r (runtime.js:3)
at Object.<anonymous> (vendor.js:8)
at Object.e (vendor.js:8)
at r (runtime.js:3)
at Object.<anonymous> (vendor.js:8)
at Object._ (vendor.js:8)
af-appx.worker.min.js:6 Uncaught TypeError: Function(...) is not a function
at Object.<anonymous> (vendor.js:14)
at Object.b8 (vendor.js:14)
at r (runtime.js:3)
at Object.a34a (vendor.js:14)
at r (runtime.js:3)
at Object.<anonymous> (vendor.js:8)
at Object.e (vendor.js:8)
at r (runtime.js:3)
at Object.<anonymous> (vendor.js:8)
at Object._ (vendor.js:8)
如果 HBuilderX 创建的项目运行无此问题,就尝试更新一下 CLI 的依赖: npx @dcloudio/uvm
如果仍然有问题,打印一下依赖:npm run info
-
9***@qq.com (作者)
npx @dcloudio/uvm 3.2.15.20211120 安装后,支付宝小程序运行仍旧报相同的错
uni-park % npm run info
> uni-park@0.1.0 info /Users/JZB/Desktop/workspace/uni-park
> node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js
uni-app v3.2.16
uni-app cli v2.0.0-32920211122002
Environment Info:
System:
OS: macOS 12.0.1
CPU: (4) x64 Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
Binaries:
Node: 14.15.5 - /usr/local/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 6.14.11 - /usr/local/bin/npm
Browsers:
Chrome: 96.0.4664.55
Firefox: 91.0.2
Safari: 15.1
npmPackages:
@dcloudio/types: => 2.5.13
@dcloudio/uni-app-plus: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-app-plus-nvue: 0.0.1
@dcloudio/uni-app-plus-nvue-v8: 0.0.1
@dcloudio/uni-automator: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-cli-i18n: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-cli-shared: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-h5: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-helper-json: => 1.0.13
@dcloudio/uni-i18n: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-migration: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-360: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-alipay: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-baidu: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-kuaishou: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-lark: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-qq: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-toutiao: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-vue: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-mp-weixin: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-quickapp-native: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-quickapp-webview: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uni-stat: 2.0.0-32920211122002 => 2.0.0-32920211122002 (2.0.0)
@dcloudio/uni-template-compiler: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/uvm: ^0.0.4 => 0.0.4
@dcloudio/vue-cli-plugin-hbuilderx: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/vue-cli-plugin-uni: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/vue-cli-plugin-uni-optimize: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/webpack-uni-mp-loader: 2.0.0-32920211122002 => 2.0.0-32920211122002
@dcloudio/webpack-uni-nvue-loader: 0.0.1
@dcloudio/webpack-uni-pages-loader: 2.0.0-32920211122002 => 2.0.0-32920211122002
@hap-toolkit/dsl-vue: 0.6.13
@vue/babel-helper-vue-jsx-merge-props: 1.2.1
@vue/babel-helper-vue-transform-on: 1.0.2
@vue/babel-plugin-jsx: 1.1.1
@vue/babel-plugin-transform-vue-jsx: 1.2.1
@vue/babel-preset-app: 4.5.15
@vue/babel-preset-jsx: 1.2.4
@vue/babel-sugar-composition-api-inject-h: 1.2.1
@vue/babel-sugar-composition-api-render-instance: 1.2.4
@vue/babel-sugar-functional-vue: 1.2.2
@vue/babel-sugar-inject-h: 1.2.2
@vue/babel-sugar-v-model: 1.2.3
@vue/babel-sugar-v-on: 1.2.3
@vue/cli-overlay: 4.5.15
@vue/cli-plugin-babel: ~4.5.0 => 4.5.15
@vue/cli-plugin-router: 4.5.15
@vue/cli-plugin-vuex: 4.5.15
@vue/cli-service: ~4.5.0 => 4.5.15
@vue/cli-shared-utils: 4.5.15
@vue/component-compiler-utils: 3.3.0 (3.3.0)
@vue/devtools-api: 6.0.0-beta.15
@vue/preload-webpack-plugin: 1.1.2
@vue/shared: ^3.0.0 => 3.2.23
@vue/web-component-wrapper: 1.3.0
mpvue-page-factory: 1.0.1
mpvue-template-compiler: 1.0.13
uni-h5-vue: 2.6.10
uni-mp-vue: 2.6.10
vue: ^2.6.11 => 2.6.14
vue-hot-reload-api: 2.3.4
vue-lazyload: 1.2.3
vue-loader: 15.9.8 (16.8.3, 15.9.8)
vue-router: 3.0.1
vue-style-loader: 4.1.3 (4.1.3)
vue-template-compiler: ^2.6.11 => 2.6.14 (2.6.14)
vue-template-es2015-compiler: 1.9.1
vue3: 1.0.0
vuex: ^3.2.0 => 3.6.2 (3.6.2)
npmGlobalPackages:
@vue/cli: 4.5.7
JZB@jzb uni-park %
2021-12-02 17:46
-
9***@qq.com (作者)
回复 DCloud_UNI_GSQ: {
"name": "uni-park",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
},
"dependencies": {
"@dcloudio/uni-app-plus": "2.0.0-32920211122002",
"@dcloudio/uni-h5": "2.0.0-32920211122002",
"@dcloudio/uni-helper-json": "",
"@dcloudio/uni-mp-360": "2.0.0-32920211122002",
"@dcloudio/uni-mp-alipay": "2.0.0-32920211122002",
"@dcloudio/uni-mp-baidu": "2.0.0-32920211122002",
"@dcloudio/uni-mp-kuaishou": "2.0.0-32920211122002",
"@dcloudio/uni-mp-lark": "2.0.0-32920211122002",
"@dcloudio/uni-mp-qq": "2.0.0-32920211122002",
"@dcloudio/uni-mp-toutiao": "2.0.0-32920211122002",
"@dcloudio/uni-mp-vue": "2.0.0-32920211122002",
"@dcloudio/uni-mp-weixin": "2.0.0-32920211122002",
"@dcloudio/uni-quickapp-native": "2.0.0-32920211122002",
"@dcloudio/uni-quickapp-webview": "2.0.0-32920211122002",
"@dcloudio/uni-stat": "2.0.0-32920211122002",
"@vue/shared": "^3.0.0",
"bankcardinfo": "^2.0.6",
"coordtransform": "2.1.2",
"core-js": "^3.6.5",
"entities": "1.1.0",
"flyio": "^0.6.2",
"hd-app-js-sdk": "^0.1.24",
"jweixin-module": "1.6.0",
"md5": "^2.3.0",
"mini-html-parser2": "^0.3.0",
"regenerator-runtime": "^0.12.1",
"sass": "~1.32.7",
"sass-loader": "~10.1.1",
"vconsole": "^3.4.0",
"vue": "^2.6.11",
"vuex": "^3.2.0"
},
"devDependencies": {
"@dcloudio/types": "",
"@dcloudio/uni-automator": "2.0.0-32920211122002",
"@dcloudio/uni-cli-i18n": "2.0.0-32920211122002",
"@dcloudio/uni-cli-shared": "2.0.0-32920211122002",
"@dcloudio/uni-i18n": "2.0.0-32920211122002",
"@dcloudio/uni-migration": "2.0.0-32920211122002",
"@dcloudio/uni-template-compiler": "2.0.0-32920211122002",
"@dcloudio/uvm": "^0.0.4",
"@dcloudio/vue-cli-plugin-hbuilderx": "2.0.0-32920211122002",
"@dcloudio/vue-cli-plugin-uni": "2.0.0-32920211122002",
"@dcloudio/vue-cli-plugin-uni-optimize": "2.0.0-32920211122002",
"@dcloudio/webpack-uni-mp-loader": "2.0.0-32920211122002",
"@dcloudio/webpack-uni-pages-loader": "2.0.0-32920211122002",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"jest": "^25.4.0",
"mini-types": "",
"miniprogram-api-typings": "",
"postcss-comment": "^2.0.0",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"Android >= 4",
"ios >= 8"
],
"uni-app": {
"scripts": {}
}
}2021-12-02 23:37
DCloud_UNI_GSQ
已修复
2021-12-06 14:42