Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pocketbase version 0.24.3 no longer generates types #114

Closed
cntrvsy opened this issue Jan 15, 2025 · 5 comments
Closed

pocketbase version 0.24.3 no longer generates types #114

cntrvsy opened this issue Jan 15, 2025 · 5 comments

Comments

@cntrvsy
Copy link

cntrvsy commented Jan 15, 2025

Describe the bug
pocketbase version 0.24.3 no longer generates types using the script "typegen": "npx pocketbase-typegen --out ./src/lib/types/pocketbase.d.ts --env"

Response {
  size: 0,
  timeout: 0,
  [Symbol(Body internals)]: {
    body: PassThrough {
      _events: [Object],
      _readableState: [ReadableState],
      _writableState: [WritableState],
      allowHalfOpen: true,
      _maxListeners: undefined,
      _eventsCount: 2,
      [Symbol(shapeMode)]: true,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: null
    },
    disturbed: false,
    error: null
  },
  [Symbol(Response internals)]: {
    url: 'https://pocketbase.myapp.xyz/api/collections/_superusers/auth-with-password',
    status: 404,
    statusText: 'Not Found',
    headers: Headers { [Symbol(map)]: [Object: null prototype] },
    counter: 1
  }
}

Versions
pocketbase-typegen version: v1.3.0
pocketbase version: 0.24.3

@shellstep
Copy link

+1

@SyahmiRafsan
Copy link

Have you tried clearing the node_modules folder?

The typegen is working fine on my end and here are my versions from package.json :

    "pocketbase": "^0.25.1",
    "pocketbase-typegen": "^1.3.0",

My pocketbase embed version: 0.24.4

@cntrvsy
Copy link
Author

cntrvsy commented Jan 29, 2025

Have you tried clearing the node_modules folder?

The typegen is working fine on my end and here are my versions from package.json :

    "pocketbase": "^0.25.1",
    "pocketbase-typegen": "^1.3.0",

My pocketbase embed version: 0.24.4

i have cleared my node_modules folder and reinstalled using npm i/ npm update but can't seem to get it to work, im still on version 0.24.3 (pocketbase), the pocketbase js sdk "pocketbase": "^0.25.1", and "pocketbase-typegen": "1.3.0", still getting the error above.

@gevera
Copy link

gevera commented Jan 31, 2025

It seems is the issue using the .env file

@cntrvsy
Copy link
Author

cntrvsy commented Jan 31, 2025

It seems is the issue using the .env file

yup, you were right it was my env file.
PB_TYPEGEN_URL="https://XXXXX.XXXXXXX.XX.XX/"
PB_TYPEGEN_EMAIL="XXXXXX@XXXXX.xxx"
PB_TYPEGEN_PASSWORD="XXXXXXXXXXXXXXX"

the slash at the end of the URL variable was what causing the issue, removing it and the typegen works fine.
, sorry for such a small mistake and wasting everyone's time. also thank you for everyone who took the time to look at my silly misconfiguration problem.

@cntrvsy cntrvsy closed this as completed Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants