Fixing Uncaught ReferenceError: Vue is not defined with webpack

I am moving to a workflow using WebPack, which bundles code. While transitioning, I stumbled across this error: Uncaught ReferenceError: Vue is not defined at eval (external “Vue”?548a:1) at Object.<anonymous> (pcp_mainbundle.js:172) at __webpack_require__ (pcp_mainbundle.js:20) at eval (pcpVue.js?6cb8:1) at Object.<anonymous> (pcp_mainbundle.js:196) at __webpack_require__ (pcp_mainbundle.js:20) at eval (pcpMain.js?814e:1) at Object.<anonymous> (pcp_mainbundle.js:189) at __webpack_require__ (pcp_mainbundle.js:20) at Object.<anonymous> (pcp_mainbundle.js:181)…

Weiterlesen

vue.js history vs hash mode on a subpath

In case you are mounting your vue Router not on the root page, but a “subpath”, there is an important difference in the behavior of Vue Router in history and hash mode. History mode If you want, for example, to use https://picockpit.local/debug/ to have the Vue Router live on, in history mode: The following routes…

Weiterlesen

PiCockpit: online / offline states, and MQTT

In the upcoming PiCockpit release, we will have an online status tracking for Pi’s connected via picockpit-client. The online function is realized by MQTT’s Last Will & Testament feature. You can test it by unplugging your Pi from the network. I unplugged the Pi at: 17:59:10 At about 18:00:05 it was shown as offline: Why…

Weiterlesen

Paho failure to subscribe

Problem AMQJS0005E Internal error. Error Message: Cannot read property ‘show’ of undefined This error is shown sporadically, especially when you Shift-Reload the whole page. Solution I have a Vue.js Plugin to show “toast” messages (Vue.toasted). I currently use it for debugging purposes. Everything worked fine initially, as my code was executed after Vue was initialized…

Weiterlesen