I recently utilized npm to install both vue (2.4.2) and vuex (2.3.1). However, when attempting to compile the following code snippet, I encountered the following error:
https://i.stack.imgur.com/0ZKgE.png
Store.ts
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex); // The error occurs at this line
export default new Vuex.Store({
// store content here
})
tsconfig.json
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"lib": [
"es2015",
"dom",
"es2015.promise"
],
"module": "es2015",
"moduleResolution": "node",
"noImplicitAny": false,
"removeComments": false,
"sourceMap": true,
"target": "es5"
},
"exclude": [
"./node_modules",
"wwwroot",
"./Model"
],
"include": [
"./CCSEQ",
"./WebResources",
"./sfc.d.ts"
]
}
While browsing through this question, I didn't find much useful information.
Could someone help me understand why this error is occurring and how it can be resolved?