vue中報錯:[vuex] module namespace not found in mapActions(): comment/
控制檯報錯
檢查了我的倉庫中namespaced,沒有寫錯。
最後發現,該模組所在的小倉庫沒有在大倉庫中進行註冊,導致出錯。
在大倉庫中註冊
- index.js程式碼
import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import comment from './modules/comment'
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
app,
settings,
user,
comment
},
getters
})
export default store
註冊comment模組,報錯解除。
相關文章
- vuex2中使用mapGetters/mapActions報錯解決方法Vue
- vuex報錯 vuex__WEBPACK_IMPORTED_MODULE_1__.default.store is not a constructorVueWebImportStruct
- npm install報錯, npm ERR! code MODULE_NOT_FOUNDNPM
- VueX Vue: Could not find a declaration file for module vuex.Vue
- This relative module was not found: * ./_import_dev in ./src/router/index.js報錯ImportdevIndexJS
- Vuex之moduleVue
- vuex 原始碼:深入 vuex 之 moduleVue原始碼
- 理解Vuex的輔助函式mapState, mapActions, mapMutations用法Vue函式
- gorm忽略報錯: record not foundGoORM
- Vue啟動報錯 Cannot find module 'webpack/bin/config-yargs'VueWeb
- vuex核心概念---action、getter、moduleVue
- 如何更好的使用module vuex?Vue
- 【linux報錯】-bash: xhost: command not foundLinux
- 使用URLClassLoader報錯not class found exceptionException
- iOS12-Xcode12-Buildtime錯誤:framework not found Pods 或 No such module 'XXX'iOSXCodeUIFramework
- Linux:Python報錯:No module named MySQLdbLinuxPythonMySql
- webstorm vue3+ts報錯:Cannot find module ‘@/views/xxx.vue‘ or its corresponding type declarationsWebORMVueView
- [Vuex系列] - Module的用法(終篇)Vue
- 【maven】Maven報錯 zip END header not foundMavenHeader
- python virtualenv報錯-bash: virtualenv: command not foundPython
- Vuex中使用報錯unknown mutation typeVue
- vue - VuexVue
- vue--vuex 中 Modules 詳解Vue
- Lumen 報錯 : Class 'League\Flysystem\Adapter\Local' not foundAPT
- Mac之telnet報錯-bash: telnet: command not foundMac
- React Native 報錯 'config.h' file not foundReact Native
- 設定Ruby報錯bad response Not Found 404
- QT中namespaceQTnamespace
- 解決Vue中”This dependency was not found”的方法Vue
- 在Vue3中使用vuexVue
- jspDemo-1.0-SNAPSHOT.war not found for the web module.JSWeb
- Vue--VuexVue
- Vuex原始碼學習(四)module與moduleCollectionVue原始碼
- go tool compile 報錯 could not import sync (file not found)GoCompileImport
- cgo: C compiler "gcc" not found 報錯安裝gccGoCompileGC
- sourcetree github clone 報錯 hg clone fails with “repository not found“GithubAI
- AS執行main()方法報錯:SourceSet with name ‘main‘ not foundAI
- 執行npm run dev 後報錯 Mix: not foundNPMdev