palerdot / vue-speedometer

Vue component library for showing speedometer like gauge using d3

Home Page:https://palerdot.in/vue-speedometer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

this.querySelector is undefined

astjohn opened this issue · comments

Using vue 2.6.10 and webpack.

TypeError: this.querySelector is not a function
    at Comment.__webpack_exports__.default (selector.js:6)
    at Selection.eval [as select] (select.js:12)
    at VueComponent.renderGauge (index.js:1)
    at VueComponent.mounted (index.js:1)
    at invokeWithErrorHandling (vue.runtime.esm.js:1853)
    at callHook (vue.runtime.esm.js:4207)
    at Object.insert (vue.runtime.esm.js:3136)
    at invokeInsertHook (vue.runtime.esm.js:6330)
    at VueComponent.patch [as __patch__] (vue.runtime.esm.js:6549)
    at VueComponent.Vue._update (vue.runtime.esm.js:3936)

at Comment.webpack_exports.default (selector.js:6)

__webpack_require__.r(__webpack_exports__);
function none() {}

/* harmony default export */ __webpack_exports__["default"] = (function(selector) {
  return selector == null ? none : function() {
    return this.querySelector(selector);
  };
});

Any help is greatly appreciated.

commented

I'm getting the same error!

image

Same error here, vue 2.5.22

@xbill82 @negaodanado @astjohn

Please refer this comment if you run into vue cli you are using the runtime only build of vue where the template compiler is not available message when running from your local setup bootstrapped with vue-cli. Basically create a vue.config.js

// vue.config.js
module.exports = {
  runtimeCompiler: true
}

I'm closing this issue. Please reopen if you still face this issue with a reproducible sandbox if possible.