Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.querySelector is undefined #7

Closed
astjohn opened this issue Mar 8, 2020 · 4 comments
Closed

this.querySelector is undefined #7

astjohn opened this issue Mar 8, 2020 · 4 comments

Comments

@astjohn
Copy link

astjohn commented Mar 8, 2020

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.

@imznx
Copy link

imznx commented Mar 20, 2020

I'm getting the same error!

image

@xbill82
Copy link

xbill82 commented Mar 20, 2020

Same error here, vue 2.5.22

@palerdot
Copy link
Owner

palerdot commented Mar 22, 2020

@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
}

@palerdot
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants