[Vuejs]-"Property $notify does not exist on type" – Can't use npm package on Vue App

0👍

Add a shim typings file

You need a file that imports and re-exports the type of "Vue", it is named vue-file-import.d.ts, but elsewhere on the internet it is commonly called vue-shim.d.ts. Regardless of name, the content needed is the same:

// vue-file-import.d.ts

declare module "*.vue" {
   import Vue from "vue";
   export default Vue;
}

Try placing the above file in /src location. But sometimes when you move around changing things it might not work so I suggest you to place it inside /typings location

Leave a comment