这是package.json
{
"name": "triangle-mp",
"version": "0.1.0",
"private": true,
"scripts": {
"test": "npm run test:mp-weixin",
"serve": "npm run dev:mp-weixin",
"lint": "eslint --fix --ext .js,.vue src",
"build": "npm run build:mp-weixin",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-weixin-dev": "cross-env NODE_ENV=production VUE_APP_ENV=dev UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:mp-weixin-test": "cross-env NODE_ENV=production VUE_APP_ENV=test UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:mp-weixin-sit": "cross-env NODE_ENV=production VUE_APP_ENV=sit UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:mp-weixin-uat": "cross-env NODE_ENV=production VUE_APP_ENV=uat UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:mp-weixin-prod": "cross-env NODE_ENV=production VUE_APP_ENV=prod UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:mp-alipay-uat": "cross-env NODE_ENV=production VUE_APP_ENV=uat UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-alipay-prod": "cross-env NODE_ENV=production VUE_APP_ENV=prod UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin VUE_APP_ENV=test jest -i",
"test:api": "cross-env NODE_ENV=test VUE_APP_ENV=uat UNI_PLATFORM=mp-weixin jest api.test.js",
"test:menu": "cross-env NODE_ENV=test VUE_APP_ENV=uat UNI_PLATFORM=mp-weixin jest menu.test.js"
},
"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.1-33920220314002",
"@dcloudio/uni-h5": "^2.0.1-33920220314002",
"@dcloudio/uni-helper-json": "^1.0.13",
"@dcloudio/uni-i18n": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-360": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-alipay": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-baidu": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-jd": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-kuaishou": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-lark": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-qq": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-toutiao": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-vue": "^2.0.1-33920220314002",
"@dcloudio/uni-mp-weixin": "^2.0.1-33920220314002",
"@dcloudio/uni-quickapp-native": "^2.0.1-33920220314002",
"@dcloudio/uni-quickapp-webview": "^2.0.1-33920220314002",
"@dcloudio/uni-stat": "^2.0.1-33920220314002",
"@vue/shared": "^3.2.31",
"axios": "^0.21.1",
"core-js": "^3.10.1",
"crypto-js": "^4.1.1",
"flyio": "^0.6.14",
"luch-request": "^3.0.5",
"pako": "^2.0.3",
"regenerator-runtime": "^0.12.1",
"umtrack-wx": "^2.7.1",
"vue": "^2.6.14",
"vuex": "^3.6.2"
},
"devDependencies": {
"@babel/eslint-parser": "^7.15.0",
"@dcloudio/types": "^2.3.3",
"@dcloudio/uni-automator": "^2.0.1-33920220314002",
"@dcloudio/uni-cli-i18n": "^2.0.1-33920220314002",
"@dcloudio/uni-cli-shared": "^2.0.1-33920220314002",
"@dcloudio/uni-migration": "^2.0.1-33920220314002",
"@dcloudio/uni-template-compiler": "^2.0.1-33920220314002",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-33920220314002",
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-33920220314002",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-33920220314002",
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-33920220314002",
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-33920220314002",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.3",
"browserslist": "^4.21.4",
"caniuse-lite": "^1.0.30001436",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-html": "^6.1.2",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^7.16.0",
"jest": "^25.5.4",
"mini-types": "^0.1.5",
"miniprogram-api-typings": "^3.4.1",
"miniprogram-automator": "^0.10.0",
"postcss-comment": "^2.0.0",
"sass": "^1.35.2",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.14"
},
"browserslist": [
"Android >= 4",
"ios >= 8"
],
"uni-app": {
"scripts": {}
}
}
- 发布:2022-12-06 17:47
- 更新:2022-12-06 17:47
- 阅读:217
产品分类: uniapp/小程序/阿里
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10.0.19042.1415
第三方开发者工具版本号: 3.2.6
基础库版本号: 2.0
项目创建方式: CLI
CLI版本号: 2.0.1-33920220314002
示例代码:
操作步骤:
运行
运行
预期结果:
预期正常编译
预期正常编译
实际结果:
TypeError: Function(...) is not a function
at Object._ (vendor.js:8329:1)
at __webpack_require__ (runtime.js:92:1)
at Object.<anonymous> (index.js:175:1)
at Object._ (index.js:838:1)
at __webpack_require__ (runtime.js:92:1)
at Module._ (index.js:157:1)
at __webpack_require__ (runtime.js:92:1)
at Module._ (index.js:30:1)
at __webpack_require__ (runtime.js:92:1)
at Object.<anonymous> (index.js:13:1)
TypeError: Function(...) is not a function
at Object._ (vendor.js:8329:1)
at __webpack_require__ (runtime.js:92:1)
at Object.<anonymous> (index.js:175:1)
at Object._ (index.js:838:1)
at __webpack_require__ (runtime.js:92:1)
at Module._ (index.js:157:1)
at __webpack_require__ (runtime.js:92:1)
at Module._ (index.js:30:1)
at __webpack_require__ (runtime.js:92:1)
at Object.<anonymous> (index.js:13:1)
bug描述:
问题情况有点像 这位兄弟遇到的https://ask.dcloud.net.cn/question/135459
但是我也运行了文中说到的 重新执行 npx @dcloudio/uvm 更新到 2.0.1-32920211122003 还是不行;
另外我执行npx @dcloudio/uvm 更新最新版本时,报错 如图二
但是 ios真机正常, 开发者工具和安卓机不行