Quasar: The computed property "locale" is already defined as a prop

Created on 28 Jun 2019  路  8Comments  路  Source: quasarframework/quasar

Describe the bug
Date picked with QInput is not working.

In this fiddle the q-input works fine, but by copy pasting the same project locally doesn't works.

The date picker it is not showing and I am also getting an error in the console:

The computed property "locale" is already defined as a prop

This error appeared after upgrading to "^1.0.0-rc.5"

Quasar version: "^1.0.0-rc.5",
Quasar extras: "^1.1.3"

bug

All 8 comments

Screenshot with behavior when clicking on the icon:

image

We had to downgrade back to beta.

What other packages are you using? What's the output of quasar info in your project folder? And how does your package.json looks like?

Please contact me on Discord so we can speed this up. Thanks.

The problem is that some external package adds a global vue mixin with "locale" as a computed property. Trying to figure out what is that package that you are using.

Hey @rstoenescu

Here's a list of our dependencies:

 "dependencies": {
    "@quasar/extras": "^1.1.2",
    "ag-grid-community": "^20.2.0",
    "ag-grid-enterprise": "^20.2.0",
    "ag-grid-vue": "^20.2.0",
    "axios": "^0.18.1",
    "cleave.js": "^1.4.10",
    "deepmerge": "^3.2.0",
    "file-icon-vectors": "^1.0.0",
    "format-currency": "^1.0.0",
    "highcharts": "^7.1.1",
    "highcharts-vue": "^1.2.0",
    "lang.js": "^1.1.12",
    "moment": "^2.22.2",
    "moment-timezone": "^0.5.23",
    "object-hash": "^1.3.1",
    "quasar": "^1.0.0-beta.21",
    "string-strip-html": "^4.0.0",
    "stylus-loader": "^3.0.2",
    "vue": "^2.6.10",
    "vue-html-to-paper": "^1.0.3",
    "vue-property-decorator": "^8.1.1",
    "vue-rollbar": "^0.2.4",
    "vue-router": "^3.0.6",
    "vue-scrollto": "^2.13.0",
    "vuedraggable": "^2.20.0",
    "vuex": "^3.0.1",
    "vuex-pathify": "^1.1.3",
    "vuex-router-sync": "^5.0.0"
  },
  "devDependencies": {
    "@fortawesome/fontawesome-pro": "^5.6.1",
    "@vue/cli-plugin-babel": "^3.0.0-rc.10",
    "@vue/cli-plugin-e2e-cypress": "^3.0.0-rc.10",
    "@vue/cli-plugin-eslint": "^3.0.0-rc.10",
    "@vue/cli-plugin-unit-jest": "^3.0.0-rc.10",
    "@vue/cli-service": "^3.0.0-rc.10",
    "@vue/eslint-config-standard": "^4.0.0",
    "@vue/test-utils": "^1.0.0-beta.23",
    "babel-core": "7.0.0-bridge.0",
    "babel-jest": "^24.1.0",
    "babel-plugin-transform-imports": "1.5.0",
    "cache-loader": "2.0.1",
    "jsdoc": "^3.5.5",
    "laravel-localization-loader": "^1.0.5",
    "lint-staged": "^8.1.4",
    "lodash": "latest",
    "node": "^11.10.0",
    "node-sass": "^4.9.2",
    "rollbar-sourcemap-webpack-plugin": "^2.5.0",
    "sass-loader": "^7.1.0",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.2",
    "stylus-variable-loader": "0.0.3",
    "vue-cli-plugin-quasar": "^1.0.0-beta.1",
    "vue-template-compiler": "^2.6.10"
  },

Please try to find which of those adds a global vue mixin with a computed property named "locale", because that doesn't come from Quasar. It might come from your own code. Please investigate and let me know. Thanks.

Yup that was the issue. We had a computed property named locale. Thanks @rstoenescu !

Alternatively use a different name for your locale, like lokale...

>

or, as I like to do, computedLocale or parsedLocale

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fnicollier picture fnicollier  路  3Comments

jippy89 picture jippy89  路  3Comments

victorborgaco picture victorborgaco  路  3Comments

jean-moldovan picture jean-moldovan  路  3Comments

slowaways picture slowaways  路  3Comments