BeReal
BeReal
WWasp-lang
Created by BeReal on 10/3/2024 in #🙋questions
syntax of importing from wasp
Hi I am pretty newbie to typescript and wasp, I have python experience though. I was asking chatgpt to create a simple function to try and call my python backend. I am in the process of combining them.
import { action } from '@wasp/actions'

export const analyzeData = action({
run: async ({ data }) => {
const response = await fetch('http://localhost:8000/analyze', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
return await response.json()
}
})
import { action } from '@wasp/actions'

export const analyzeData = action({
run: async ({ data }) => {
const response = await fetch('http://localhost:8000/analyze', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
return await response.json()
}
})
chatGPT suggested this, but I cant import like this its giving errors on running wasp start . Is chatGPT completely wrong or am I doing sth wrong, where can I find some documentation on how to do this correctly
8 replies
WWasp-lang
Created by BeReal on 9/27/2024 in #🙋questions
Waspello example
I am trying to run the waspello example but am getting a bunch of errors: [ Wasp ] auth/providers/types.ts(11,37): error TS2694: Namespace '"/Users/b2077/PycharmProjects/waspexample/waspello/.wasp/out/sdk/wasp/node_modules/.prisma/client/index".Prisma' has no exported member 'UserCreateInput'. [ Wasp ] auth/utils.ts(132,17): error TS2694: Namespace '"/Users/b2077/PycharmProjects/waspexample/waspello/.wasp/out/sdk/wasp/node_modules/.prisma/client/index".Prisma' has no exported member 'AuthWhereInput'. [ Wasp ] auth/utils.ts(193,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'. [ Wasp ] auth/utils.ts(193,62): error TS2339: Property 'code' does not exist on type 'unknown'. [ Wasp ] auth/utils.ts(199,27): error TS2339: Property 'PrismaClientValidationError' does not exist on type 'typeof Prisma'. [ Wasp ] auth/utils.ts(210,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'. [ Wasp ] auth/utils.ts(210,62): error TS2339: Property 'code' does not exist on type 'unknown'. [ Wasp ] auth/utils.ts(221,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'. ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - SDK build failed with exit code: 2 any clue what is going wrong?
13 replies
WWasp-lang
Created by BeReal on 9/21/2024 in #🙋questions
Google OAuth help
Hi I am a bit stuck, I am using the Saas Template and trying to add Google OAuth, I have followed all the steps in the documentation but am stuck probably due to my lack of experience. I am trying to test locally the OAuth I have added localhost as a redirect uri in my google cloud console. When I click sign up with google I get redirected to http://localhost:3001/auth/google/login where I get a refused to connect error. If i change the port to 3000, i do not get the error but just nothing happens. I have two questions what is going on with the 3000 and 3001 ports, should I specify the ports somewhere? Secondly, what could be the reason my google oauth is not working?
9 replies