Skip to content

Better error message for Vuex mapActions typo #1327

New issue

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

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

Already on GitHub? # to your account

Closed
elithecho opened this issue Jul 2, 2018 · 2 comments
Closed

Better error message for Vuex mapActions typo #1327

elithecho opened this issue Jul 2, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@elithecho
Copy link

What problem does this feature solve?

While working using Vuex, I came across an error which took me quite a chunk of time to debug and I thought this deserves a better error messages.

While using map actions ...mapActions('select'Filter) - notice the mistake with no square brackets in Listings -> Filters -> SelectFilter component. The error went up to top level component and appears as below.

vue.runtime.esm.js:587 [Vue warn]: Failed to resolve async component: function Listings() {
      return __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! @/pages/Listings/index.vue */ "./app/javascript/pages/Listings/index.vue"));
    }
Reason: TypeError: Cannot convert undefined or null to object

What does the proposed API look like?

Show shows error message pointing to correct file and line.

@LinusBorg LinusBorg added the enhancement New feature or request label Jul 9, 2018
@winniehell
Copy link

similar issue for mapState: #1162

@ktsn
Copy link
Member

ktsn commented Nov 10, 2019

fixed via #1297

@ktsn ktsn closed this as completed Nov 10, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants