Tincan
Explore posts from serversnuxt/eslint doesn't recognise global helpers in plugins folder
I have a number of files in my plugins folder and nuxt/eslint module is flagging the following as undefined, even though they're not and my project still works useRuntimeConfig, defineNuxtPlugin.
A workaround is to add this to config, but it seems odd (a bug?) that it can't just read these in the plugins folder when it doesn't flag as a problem for the rest of the project
languageOptions: {
globals: {
defineNuxtPlugin: "readonly",
useRuntimeConfig: "readonly",
},
},
10 replies
(fixed) Cannot get esling.config.mjs to generate when installing eslint module
I'm trying to get the nuxt/eslint module working on my nuxt 3 project. I've installed and created the eslint.config.mjs file with contents as per the docs. As far as I can tell this file it references should be created when I install the module, but i cannot get it to
My package.json is as follows
versions eslint 9.13, nuxt/eslint 0.6.0, node v20.9.0
I've tried removing and adding the eslint related packages
11 replies
Can't import the named export 'getCurrentInstance' in ./node_modules/vue-demi/lib/index.mjs
I'm trying to reverse engineer something in a nuxt 3 site for a nuxt 2 and I want to use intersectionObserver and windowSize from @vueuse/core, which I've installed version 5.3.0 which is the latest version still compatible with Vue 2.
However I get this error still
I've tried the following fix in nuxt.config.js with no success
1 replies
Service worker loaded by PWA causing constant reload
I have a service worker loaded by the @vite-pwa/nuxt plugin config in nuxt.config.ts which handles push notifications as well as offline install.
This all works initially, but once loaded if I reset notification sin the browser this sometimes cause some issue where the site constantly reloads.
Initially it says
But then when resetting notifications, in the console it says this and triggers a constant reload situation
Eventually it does seem to resolve itself (stop reloading) but is there a way I can stop it having to refresh so much - if the file is already cached, proceed rather than reload
The config is
50 replies
Why isn't window.addeventListener working in plugin file?
I have this file sw-register.js being loaded as a plugin and I see the "inside if" console log, but not the "inside addevent listener". I have confirmed that window exists, but it does not appear to have the addEventListener function listed in the console. Any ideas?
4 replies