Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This dependency was not found - TypeScript, Vue

I am new to TS and Vue.

Getting following error when trying to do vue-cli-service serve:

This dependency was not found:

  * @store in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/ts-loader??ref--12-1!./node_modules/vue-loader/lib??vue-loader-opt
ions!./src/components/HelloWorld.vue?vue&type=script&lang=ts&

To install it, you can run: npm install --save @store

And in ./src/components/HelloWorld.vue :

import { RootState, storeBuilder, CustomerStore } from '@store';

And in tsconfig.json :

"baseUrl": "./src",
"paths": {
  "@/*": ["src/*"],
  "store": ["./store/index.ts"], 

However when I change import to following then the error goes away.

import { RootState, storeBuilder, CustomerStore } from './../store';

Do I need any extra config or package? My stack:

- vue 3.0.1
- tsc 3.0.3
like image 688
bogumbiker Avatar asked Dec 18 '22 21:12

bogumbiker


1 Answers

'@store';

should be

'@/store';
like image 65
Linus Borg Avatar answered Dec 20 '22 11:12

Linus Borg