NEROX
WWasp
•Created by NEROX on 3/26/2025 in #🙋questions
[ Wasp ] core/auth.ts(17,7): error TS2742
I already did a
wasp clean
and wasp start
.
Last night worked fine, this morning is not compiling:be: :
Why the error is in a compiled app file (.wasp/)
[ Wasp ] core/auth.ts(17,7): error TS2742: The inferred type of 'auth' cannot be named without a reference to 'express/node_modules/@types/express-serve-static-core'. This is likely not portable. A type annotation is necessary.
❌ --- [Error] Your wasp project failed to compile: -------------------------------
- SDK build failed with exit code: 1
6 replies
WWasp
•Created by NEROX on 3/21/2025 in #🙋questions
Non-Dev question about APIs
I'm developing an app which will receive calls and return things to an extension.
I have all the UI of my app and all the corresponding operations and queries to make it work as I want.
In the extension I only have the UI and I want to implement APIs to complete its functionality.
In this case I have managed to create an API even with auth with JWT and testing it, the extension has worked.
My doubt arises at the moment of creating the API(s).
I don't know if it would be the right thing to do, but I can compare the API with an Operation, just that it is carried out externally.
Based on this, I don't know if I should create only one API and that API runs ALL the necessary code (there are many operations) or an API for each operation (each operation is simple).
Any recommendations? Best practices?
20 replies
WWasp
•Created by NEROX on 3/19/2025 in #🙋questions
Property does not exist on type
I'm missing something adding new vars in 0.16.2?
(was already declared in the template)
const openaiApi = new openai.OpenAI({
apiKey: env.OPENAI_API_KEY,
});
(added)
const deepseekApi = new openai.OpenAI({
apiKey: env.DEEPSEEK_API_KEY,
});
error TS2339: Property 'DEEPSEEK_API_KEY' does not exist on type '{ NODE_ENV: "development"; WASP_SERVER_URL: string; WASP_WEB_CLIENT_URL: string; JWT_SECRET: string; OPENAI_API_KEY: string; PORT: number; DATABASE_URL: string; SKIP_EMAIL_VERIFICATION_IN_DEV: boolean; GOOGLE_CLIENT_ID: string; GOOGLE_CLIENT_SECRET: string; PG_BOSS_NEW_OPTIONS?: string | undefined; } | { ...; }'
12 replies
WWasp
•Created by NEROX on 3/17/2025 in #🙋questions
Generate User API Key for external calls
How a user in my app could create a token to make API calls from the outside?
16 replies
WWasp
•Created by NEROX on 3/1/2025 in #🙋questions
Web socket for streaming
Create an example of web socket for streaming
11 replies
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
[ Server ] Navigating to Google...
[ Server ] Page content preview: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="origin-trial" content="A/kargTFyk8MR5ueravczef/wIlTkbVk1qXQesp39nV+xNECPdLBVeYffxrM8TmZT6RArWGQVCJ0LRivD7glcAUAAACQeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IkRpc2FibGVUaGlyZFBhcnR5U3RvcmFnZVBhcnRpdGlvbmluZzIiLCJleHBpcnkiOjE3NDIzNDIzOTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta
http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="
[ Server ] CAPTCHA detected!
[ Server!] Error in scrapeSerpResults: Error: Google is requesting CAPTCHA verification
28 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
Database error:
ERROR: extension "vector" is not available
DETAIL: Could not open extension control file "/usr/share/postgresql/16/extension/vector.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.
DbError { severity: "ERROR", parsedseverity: Some(Error), code: SqlState(E0A000), message: "extension "vector" is not available", detail: Some("Could not open extension control file "/usr/share/postgresql/16/extension/vector.control": No such file or directory."), hint: l: Some("Could not
Some("The extension must first be installed on the system where PostgreSQL is running."), position: None, where: None, schema: None, tabl must first be inste: None, column: None, datatype: None, constraint: None, file: Some("extension.c"), line: Some(543), routine: Some("parse_extension_contro constraint: None, l_file") }
36 replies
WWasp
•Created by NEROX on 2/11/2025 in #🙋questions
Consider updating to 'node16', 'nodenext', or 'bundler'
[ Wasp ] There are types at '/home/rootall/apps/WhiteHatSeoTactics/app/node_modules/wasp/dist/ext-src/server/webScraper.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
What this means? What I shoud do?
19 replies
WWasp
•Created by NEROX on 2/10/2025 in #🙋questions
public API for Chrome Extension
I am trying to create an API to receive and send information from a Chrome extension, what would be the correct process to define it in main.wasp?
Create me a complete example
39 replies
WWasp
•Created by NEROX on 12/18/2024 in #🙋questions
Unable to login with the OAuth provider.
https://elmossetgourmet.es/login redirects to https://el-mosset-gourmet-client.fly.dev/oauth/callback and fails
13 replies
WWasp
•Created by NEROX on 12/18/2024 in #🙋questions
CORS issue
@kapa.ai i'm experiencing a CORS issue:
Access to XMLHttpRequest at 'https://api.elmossetgourmet.es/auth/me' from origin 'https://elmossetgourmet.es' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this errorAI
api.elmossetgourmet.es/auth/me:1
Failed to load resource: net::ERR_FAILEDUnderstand this errorAI /checkout:1 Access to XMLHttpRequest at 'https://api.elmossetgourmet.es/operations/create-stripe-checkout-session' from origin 'https://elmossetgourmet.es' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this errorAI index-C393RbYu.js:169 Error al procesar el pago: At {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} g @ index-C393RbYu.js:169 await in g Oe @ index-C393RbYu.js:37 Ge @ index-C393RbYu.js:37 ct @ index-C393RbYu.js:37 S1 @ index-C393RbYu.js:37 A1 @ index-C393RbYu.js:37 (anonymous) @ index-C393RbYu.js:37 Sf @ index-C393RbYu.js:40 Ta @ index-C393RbYu.js:37 kh @ index-C393RbYu.js:37 nh @ index-C393RbYu.js:37 f4 @ index-C393RbYu.js:37Understand this errorAI index-C393RbYu.js:78
POST https://api.elmossetgourmet.es/operations/create-stripe-checkout-session net::ERR_FAILED My
Failed to load resource: net::ERR_FAILEDUnderstand this errorAI /checkout:1 Access to XMLHttpRequest at 'https://api.elmossetgourmet.es/operations/create-stripe-checkout-session' from origin 'https://elmossetgourmet.es' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this errorAI index-C393RbYu.js:169 Error al procesar el pago: At {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} g @ index-C393RbYu.js:169 await in g Oe @ index-C393RbYu.js:37 Ge @ index-C393RbYu.js:37 ct @ index-C393RbYu.js:37 S1 @ index-C393RbYu.js:37 A1 @ index-C393RbYu.js:37 (anonymous) @ index-C393RbYu.js:37 Sf @ index-C393RbYu.js:40 Ta @ index-C393RbYu.js:37 kh @ index-C393RbYu.js:37 nh @ index-C393RbYu.js:37 f4 @ index-C393RbYu.js:37Understand this errorAI index-C393RbYu.js:78
POST https://api.elmossetgourmet.es/operations/create-stripe-checkout-session net::ERR_FAILED My
middleware.ts
:
import type { Application } from 'express'
import cors from 'cors'
export const configureMiddleware = (app: Application) => {
// Habilitar CORS para todas las solicitudes
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', 'https://elmossetgourmet.es')
res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization')
res.header('Access-Control-Allow-Credentials', 'true')
// Manejar solicitudes preflight OPTIONS
if (req.method === 'OPTIONS') {
return res.status(200).send()
}
next()
})
// ConfiguraciĂłn especĂfica para rutas de autenticaciĂłn
app.use('/auth/*', (req, res, next) => {
res.header('Access-Control-Allow-Origin', 'https://elmossetgourmet.es')
res.header('Access-Control-Allow-Credentials', 'true')
next()
})
// ConfiguraciĂłn especĂfica para rutas de operaciones (incluyendo Stripe)
app.use('/operations/*', (req, res, next) => {
res.header('Access-Control-Allow-Origin', 'https://elmossetgourmet.es')
res.header('Access-Control-Allow-Credentials', 'true')
next()
})
// Middleware de CORS general como respaldo
app.use(cors({
origin: 'https://elmossetgourmet.es',
credentials: true,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization', 'X-Requested-With', 'Accept', 'Origin'],
preflightContinue: false,
optionsSuccessStatus: 204
}))
}
25 replies
WWasp
•Created by NEROX on 12/6/2024 in #🙋questions
Fly (Deploy command failed with exit code: 1)
First time seeing this error:
15 replies
WWasp
•Created by NEROX on 12/5/2024 in #🙋questions
Google Analytics Reverse Proxy
How? I feel some inconsistency in my Analytics numbers and some traffic analysis tools. Also, my traffic may be coming from places where there is a possible adblock.
16 replies
WWasp
•Created by NEROX on 12/2/2024 in #🙋questions
Volume purchasing instead of subscription/credits
I want to sell pears and apples.
My users can buy 4 pears and 3 apples from me.
Pear is a Stripe product.
Apple is another.
How could I manage this situation?
4 pears + 3 apples
10 replies
WWasp
•Created by NEROX on 11/27/2024 in #🙋questions
Stripe: Coupon codes at checkout
How to set Coupon codes at checkout?
67 replies
WWasp
•Created by NEROX on 11/26/2024 in #🙋questions
Google oAuth: change server name by app name?

41 replies
WWasp
•Created by NEROX on 11/26/2024 in #🙋questions
Exclude a country from accessing the app
Exclude a country from accessing the app, based on any geo IP api?
11 replies
WWasp
•Created by NEROX on 11/25/2024 in #🙋questions
flash change theme at reload
When I navigate with the wasp routes to a page that doesn't have the
DarkModeSwitcher
it displays the proper theme but if I reload it, as it doesn't have the DarkModeSwitcher
, it turns always white.6 replies
WWasp
•Created by NEROX on 11/21/2024 in #🙋questions
Error: Cannot find module 'dotenv/config'

10 replies