Electron-Bootstrap-Vue不想向我敬酒,并向我抛出我不明白的错误

时间:2019-11-19 15:25:08

标签: javascript vue.js electron bootstrap-vue

因此,我想使用Electron开发桌面应用程序。当我也想练习Bootstrap-Vue时,我选择了Electron-Vue样板,它看起来非常易于使用和冷却。为了使用Electron-Vue创建一个新项目,我运行了vue init simulatedgreg/electron-vue my-project

Electron-Vue不带有booostrap-vue,而仅带有vue。使用npm,我可以使用npm install bootstrap bootstrap-vue portal-vue将其放入我的项目中(是的,我还安装了Portal,因为我想使用Toast系统)。

然后,我修改了main.js以包含bootstrap和bootstrap-vue:

/*personnal addings*/
import BootstrapVue from 'bootstrap-vue'
import PortalVue from 'portal-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(BootstrapVue)
Vue.use(PortalVue)

是的!一切似乎都正常! 但这是在我遇到一个主要问题之前:

 /home/kisis/ENSEIRB-MATMECA/ENSEIRB/troisième-semestre/sgbd/my-project/node_modules/vue/dist/vue.runtime.common.dev.js:621 [Vue warn]: $attrs is readonly.

found in

---> <Portal>
       <BToastPop>
         <Sgbd2> at src/renderer/App.vue
           <Root>

和:

/home/kisis/ENSEIRB-MATMECA/ENSEIRB/troisième-semestre/sgbd/my-project/node_modules/vue/dist/vue.runtime.common.dev.js:621 [Vue warn]: $listeners is readonly.

found in

---> <Portal>
       <BToastPop>
         <Sgbd2> at src/renderer/App.vue
           <Root>

不!在此之前一切都进行得很顺利:'(

因此,每当我要使用引导程序的按需烤面包系统(与$bvToast.toast一起使用)时,都会弹出此错误。最重要的是,我的烤面包甚至都没有显示出来。我认为该错误阻止了它的存在。

但是我想,至少我有Google。因此,我进行了搜索,然后进行了搜索,发现我不是唯一出现此错误的人。 las,大多数问题都是通过修改webpack配置以添加

解决的
  resolve: {
    alias: {
      // If using the runtime only build
      vue$: 'vue/dist/vue.runtime.common.js' 
      // Or if using full build of Vue (runtime + compiler)
      // vue$: 'vue/dist/vue.esm.js'
    }
  }

可悲的是,这对我根本不起作用。我尝试了所有操作,甚至在修改后甚至运行npm run pack来“刷新” Webpack配置,但这并没有任何改变。我真的不知道该怎么办。如果有人可以帮助我,我会很高兴,因为我完全不了解发生了什么。

谢谢!

0 个答案:

没有答案