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

问题描述 投票:1回答:1

所以我想使用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配置,但这并没有改变任何内容。我真的不知道该怎么办。如果有人可以帮助我,我会很高兴,因为我根本不了解发生了什么。

提前感谢!

javascript vue.js electron bootstrap-vue
1个回答
0
投票

@@ Martijn Pieters:出于好奇,为什么我对此问题的额外信息的贡献被立即隐藏然后删除了?当然,我没有解决方案,但在我看来,我提供的信息可能会帮助您零问题的起因。我是否无意间违反了某些礼节?必须立即取消我的捐款真的很糟糕吗?

© www.soinside.com 2019 - 2024. All rights reserved.