vue-cli 创建 uniapp + ts项目 项目创建成功后运行报错 Syntax Error: TypeError: loaderContext.getOptions is not a function
- 发布:2022-03-07 11:33
- 更新:2022-04-07 17:35
- 阅读:3767
我新建了一个项目,删除node_moudules 然后重新安装就行了,真是无语,感觉组件版本直接不兼容
"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.1-33920220314003",
"@dcloudio/uni-h5": "^2.0.1-33920220314003",
"@dcloudio/uni-helper-json": "",
"@dcloudio/uni-i18n": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-360": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-alipay": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-baidu": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-jd": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-kuaishou": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-lark": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-qq": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-toutiao": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-vue": "^2.0.1-33920220314003",
"@dcloudio/uni-mp-weixin": "^2.0.1-33920220314003",
"@dcloudio/uni-quickapp-native": "^2.0.1-33920220314003",
"@dcloudio/uni-quickapp-webview": "^2.0.1-33920220314003",
"@dcloudio/uni-stat": "^2.0.1-33920220314003",
"@dcloudio/uni-ui": "^1.3.2",
"@vue/shared": "^3.0.0",
"apollo-boost": "^0.4.9",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"dayjs": "^1.11.0",
"flyio": "^0.6.2",
"graphql": "^15.1.0",
"node-sass": "^4.14.0",
"regenerator-runtime": "^0.12.1",
"sass-loader": "^8.0.2",
"umtrack-wx": "^2.5.2",
"vue": "^2.6.11",
"vue-class-component": "^6.3.2",
"vue-property-decorator": "^8.0.0",
"vuex": "^3.2.0",
"vuex-class": "^0.3.2"
},
"devDependencies": {
"@babel/plugin-syntax-typescript": "^7.2.0",
"@babel/runtime": "~7.12.0",
"@dcloudio/types": "",
"@dcloudio/uni-automator": "^2.0.1-33920220314003",
"@dcloudio/uni-cli-i18n": "^2.0.1-33920220314003",
"@dcloudio/uni-cli-shared": "^2.0.1-33920220314003",
"@dcloudio/uni-migration": "^2.0.1-33920220314003",
"@dcloudio/uni-template-compiler": "^2.0.1-33920220314003",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-33920220314003",
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-33920220314003",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-33920220314003",
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-33920220314003",
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-33920220314003",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@vue/cli-plugin-babel": "~4.5.17",
"@vue/cli-plugin-eslint": "^4.4.1",
"@vue/cli-plugin-typescript": "~4.5.11",
"@vue/cli-plugin-vuex": "^4.4.1",
"@vue/cli-service": "~4.5.17",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^5.0.2",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"graphql-tag": "^2.10.3",
"jest": "^25.4.0",
"mini-types": "",
"miniprogram-api-typings": "",
"postcss-comment": "^2.0.0",
"prettier": "^1.19.1",
"typescript": "^3.0.0",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"Android >= 4.4",
"ios >= 9"
],
"uni-app": {
"scripts": {}
}
了了_
npm run info
> applets@0.1.0 info
> node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js
uni-app v3.1.8
uni-app cli v2.0.0
Environment Info:
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Binaries:
Node: 16.14.0 - /usr/local/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 6.14.8 - ~/node_modules/.bin/npm
Browsers:
Chrome: 99.0.4844.83
Firefox: 98.0.2
Safari: 13.1
npmPackages:
@dcloudio/types: => 2.5.19
@dcloudio/uni-app-plus: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-app-plus-nvue: 0.0.1
@dcloudio/uni-app-plus-nvue-v8: 0.0.1
@dcloudio/uni-automator: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-cli-shared: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-h5: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-helper-json: => 1.0.13
@dcloudio/uni-i18n: 0.0.3
@dcloudio/uni-migration: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-mp-360: ^2.0.0-29320201014001 => 2.0.0-alpha-33020211130001
@dcloudio/uni-mp-alipay: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-mp-baidu: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-mp-qq: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-mp-toutiao: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-mp-vue: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-mp-weixin: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-quickapp-native: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-quickapp-webview: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-stat: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/uni-template-compiler: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/vue-cli-plugin-hbuilderx: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/vue-cli-plugin-uni: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/vue-cli-plugin-uni-optimize: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/webpack-uni-mp-loader: ^2.0.0-29320201014001 => 2.0.0
@dcloudio/webpack-uni-nvue-loader: 0.0.1
@dcloudio/webpack-uni-pages-loader: ^2.0.0-29320201014001 => 2.0.0
@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.17
@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.17
@vue/cli-plugin-babel: ~4.5.17 => 4.5.17
@vue/cli-plugin-eslint: ~4.5.17 => 4.5.17
@vue/cli-plugin-router: 4.5.17
@vue/cli-plugin-typescript: * => 5.0.4
@vue/cli-plugin-vuex: 4.5.17
@vue/cli-service: ~4.5.17 => 4.5.17
@vue/cli-shared-utils: 4.5.17
@vue/component-compiler-utils: 3.3.0 (3.3.0)
@vue/eslint-config-prettier: ^6.0.0 => 6.0.0
@vue/preload-webpack-plugin: 1.1.2
@vue/shared: ^3.0.0 => 3.2.31
@vue/web-component-wrapper: 1.3.0
eslint-plugin-vue: ^8.5.0 => 8.5.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-class-component: ^6.3.2 => 6.3.2 (7.2.6)
vue-eslint-parser: 8.3.0
vue-hot-reload-api: 2.3.4
vue-loader: 15.9.8 (16.8.3, 15.9.8)
vue-property-decorator: ^8.0.0 => 8.5.1
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
vuex: ^3.2.0 => 3.6.2
vuex-class: ^0.3.2 => 0.3.2
vuex-module-decorators: ^1.0.1 => 1.2.0
npmGlobalPackages:
@vue/cli: 4.5.15
2022-04-07 00:06
了了_
是否跟node版本有关系,湿了几个版本,没有解决
2022-04-07 00:07