dennisbruner / vue-native-notification

Vue.js plugin for native notifications
https://www.npmjs.com/package/vue-native-notification
MIT License
71 stars 13 forks source link

Could not find a declaration file for module 'vue-native-notification'. #13

Closed onlysumitg closed 4 years ago

onlysumitg commented 4 years ago

I am trying to use vue-native-notification in a NUXT project. I just have basic knowledge on the js side.

https://nuxtjs.org/guide/plugins/#vue-plugins

Code ` import Vue from 'vue'

import VueNativeNotification from "vue-native-notification";

// const VueNativeNotification = require('vue-native-notification')

Vue.use(VueNativeNotification, {

// Automatic permission request before

// showing notification (default: true)

requestOnNotify: true

}) `

Issue: module "c:/app_name/node_modules/vue-native-notification/index" Could not find a declaration file for module 'vue-native-notification'. 'c:/app_name/node_modules/vue-native-notification/index.js' implicitly has an 'any' type. Try 'npm install @types/vue-native-notification' if it exists or add a new declaration (.d.ts) file containing 'declare module 'vue-native-notification';'ts(7016)

Error: SyntaxError Unexpected token 'export'

I have tried npm install @types/vue-native-notification

But got the error Not Found - GET https://registry.npmjs.org/@types%2fvue-native-notification - Not found

Please suggest.

onlysumitg commented 4 years ago

Never mind. It was nuxt issue.

neuralsys commented 2 years ago

How did you fixed it?