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
CDCloudflare Developers
•Created by Tincan on 4/10/2024 in #pages-help
service worker not being served on live (CF Pages) but is locally
6 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
CDCloudflare Developers
•Created by Tincan on 3/6/2024 in #pages-help
Website domain stuck at verifying but subdomains working
I have a Pages project and I'm trying to add a domain to it. So the site has been added under Websites, but when I add this under Custom Domains in the Pages section it stays at verifying. It says 'Active' and 'data will be available here once available'
I have another existing domain, which I can added as a subdomain for this pages and that verifies fine eg aaa.website.com
4 replies
Wrong PHP version after migrating database
Deployment was working fine, but I migrated the DB to v2.
I get this issue in the Deploy Logs. I don't know where its being set to 3.11.5 or how to set it to anything else. It also seems strange that this wasn't an issue on DB v1 but is now on v2...
25 replies
CDCloudflare Developers
•Created by Tincan on 7/20/2023 in #workers-help
How do I set the path to an image from a CF function?
I have a vue/nuxt project with files like this?
assets
-img
--logo.svg
functions
-cf
--contact.js
and in contact.js some html embed (to style an email). How do I include the logo.svg in the html/email?
htmlContent:
<html><head></head><body> <img src="url('~assets/img/logo.jpg" alt="site logo"> <h1>Heading</h1>
1 replies
CDCloudflare Developers
•Created by Tincan on 3/1/2023 in #workers-help
How to use env variables in a pages function locally and live (updated title)
Hi
I have a function in /functions/cf/check-password.js which contains basic and I'm trying to call it with and I'm getting 404. How do I call this function / file
using "npx wrangler pages dev -- yarn dev" to run locally
60 replies