TypeError: IPinfoWrapper is not a constructor when building a SvelteKit appΒ #75
Open
Description
My SvelteKit app works fine in dev mode.
However when i attempt to build, i get TypeError: IPinfoWrapper is not a constructor
. My code looks like this:
import IPinfoWrapper from 'node-ipinfo';
import { IPINFO_TOKEN } from "$env/static/private";
const ipinfoWrapper = new IPinfoWrapper(IPINFO_TOKEN);
const IPinfos = await ipinfoWrapper.lookupIp(requestIP);
The full version in my wip is here if that helps: https://github.com/gtnbssn/lEmplacementExactDuCoeur/blob/main/src/routes/api/connect/%2Bserver.ts
I have found a very similar previous issue here: #44
It doesn't help though.
Is there a typescript setting I need to change maybe?
Metadata
Assignees
Labels
No labels