Skip to content

Error when using with NestJS #113

@mandrillxx

Description

@mandrillxx

Firstly, I can't import using

import PocketBase from 'pocketbase'

because of this similar issue: #34 so I'm using

const PocketBase = require('pocketbase/cjs'); 

which doesn't provide types.

Now, I'm getting this error.

ERROR [WsExceptionsHandler] fetch is not defined
ReferenceError: fetch is not defined
    at t.call (C:\Users\Desktop\nest-app\node_modules\pocketbase\src\Client.ts:247:13)

I've installed node-fetch but this is still the error I get. Is there a solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions