1

我正在尝试在这篇文章之后创建一个 ionic-vue 应用程序,但是当我在main.jsCannot convert undefined or null to object中注册@ionic/vue插件时出现错误。

import Vue from 'vue'
import App from './App.vue'
import router from './router'

import Ionic from '@ionic/vue'
import '@ionic/core/css/ionic.bundle.css'

Vue.use(Ionic)
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

包.json

  "dependencies": {
    "@ionic/core": "^4.6.2",
    "@ionic/vue": "0.0.4",
    "core-js": "^2.6.5",
    "vue": "^2.6.10",
    "vue-router": "^3.0.3"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.9.0",
    "@vue/cli-plugin-eslint": "^3.9.0",
    "@vue/cli-service": "^3.9.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "vue-template-compiler": "^2.6.10"
  }
4

1 回答 1

0

这似乎是一个问题ionicons。根据这个线程添加ionicons@4.5.9-1解决了这个问题。

于 2019-07-16T13:49:17.947 回答