jdf2e / nutui

京东风格的移动端 Vue 组件库,支持多端小程序(A Vue.js UI Toolkit for Mobile Web)
https://nutui.jd.com
MIT License
6.09k stars 826 forks source link

[bug] taro init vue3 nut-ui模板都无法跑起来 #530

Closed boot-vue closed 3 years ago

boot-vue commented 3 years ago

image

taro 创建vue3 nut-ui的模板项目启动直接报错

👽 Taro v3.2.16

(node:14612) UnhandledPromiseRejectionWarning: TypeError: ctx.onParseCreateElement is not a function
    at index (D:\bug\tdemo\node_modules\@tarojs\plugin-html\src\index.ts:54:7)
    at Kernel.initPlugin (D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:118:16)
    at Kernel.resolvePlugins (D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:93:18)
    at Kernel.initPresetsAndPlugins (D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:81:14)
    at Kernel.<anonymous> (D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:40:18)
    at Generator.next (<anonymous>)
    at D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:4:12)
    at Kernel.init (D:\bug\tdemo\node_modules\@tarojs\service\dist\Kernel.js:36:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)      
(node:14612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 3.00s.

package.json

{
  "name": "tdemo",
  "version": "1.0.0",
  "private": true,
  "description": "",
  "templateInfo": {
    "name": "vue3-NutUI",
    "typescript": true,
    "css": "sass"
  },
  "scripts": {
    "build:weapp": "taro build --type weapp",
    "build:swan": "taro build --type swan",
    "build:alipay": "taro build --type alipay",
    "build:tt": "taro build --type tt",
    "build:h5": "taro build --type h5",
    "build:rn": "taro build --type rn",
    "build:qq": "taro build --type qq",
    "build:quickapp": "taro build --type quickapp",
    "dev:weapp": "npm run build:weapp -- --watch",
    "dev:swan": "npm run build:swan -- --watch",
    "dev:alipay": "npm run build:alipay -- --watch",
    "dev:tt": "npm run build:tt -- --watch",
    "dev:h5": "npm run build:h5 -- --watch",
    "dev:rn": "npm run build:rn -- --watch",
    "dev:qq": "npm run build:qq -- --watch",
    "dev:quickapp": "npm run build:quickapp -- --watch"
  },
  "browserslist": [
    "last 3 versions",
    "Android >= 4.1",
    "ios >= 8"
  ],
  "author": "",
  "license": "MIT",
  "dependencies": {
    "@babel/runtime": "^7.7.7",
    "@tarojs/runtime": "3.2.16",
    "@tarojs/taro": "3.2.16",
    "@tarojs/components": "3.2.16",
    "@tarojs/plugin-html": "3.2.16",
    "vue": "^3.0.0",
    "@nutui/nutui-taro": "^3.0.3"
  },
  "devDependencies": {
    "@types/webpack-env": "^1.13.6",
    "@tarojs/mini-runner": "3.2.16",
    "@tarojs/webpack-runner": "3.2.16",
    "@babel/core": "^7.8.0",
    "@tarojs/cli": "3.2.16",
    "babel-preset-taro": "3.2.16",
    "@vue/compiler-sfc": "^3.0.0",
    "vue-loader": "^16.0.0-beta.8",
    "eslint-plugin-vue": "^7.0.0",
    "eslint-config-taro": "3.2.16",
    "eslint": "^6.8.0",
    "stylelint": "9.3.0",
    "@typescript-eslint/parser": "^2.x",
    "@typescript-eslint/eslint-plugin": "^2.x",
    "typescript": "^3.7.0"
  }
}
boot-vue commented 3 years ago

@tarojs/plugin-html 实际 install的版本 3.3.0-alpha.0

boot-vue commented 3 years ago

Taro 升级到 v3.3.0-beta.0 ok了 , 这................