TypeError: Cannot read property 'then' of undefined when "npm run generate" [issue link] ‘then’ method is so used : this.$store.dispatch('getOwnerDeptment') .then((response) => { let result = response.data; if (result.code === 0) { this.deptList = result.data; } }) This question is available on Nuxt.js community (#c700)