pdelfan / arena-typed

Unofficial are.na API wrapper for TypeScript
MIT License
9 stars 1 forks source link

Import not working #3

Open tylermcrobert opened 3 months ago

tylermcrobert commented 3 months ago

Hi there, I am getting the following error when importing the package:

Module '"arena-typed"' has no exported member 'Arena'. Did you mean to use 'import Arena from "arena-typed"' instead?ts(2614)

I am at the latest version (1.0.4)

pdelfan commented 3 months ago

Hi @tylermcrobert, thanks for letting me know. The example on the documentation is using a named import from the older version. If you try a default import import Arena from 'arena-typed', it should work. I've updated the documentation to reflect this change. Let me know if this works!

pdelfan commented 3 months ago

Hi @tylermcrobert, thanks for letting me know. The example on the documentation is using a named import from the older version. If you try a default import import Arena from 'arena-typed', it should work. I've updated the documentation to reflect this change. Let me know if this works!

Hi @tylermcrobert, could you please confirm if this fixes the error?

tylermcrobert commented 3 months ago

Hey @pdelfan, apologies for the delay. I'm now getting the following:

const arena = new Arena("<token>");

TypeError: __vite_ssr_import_0__.default is not a constructor at load (/Users/tylermcrobert/Sites/are.na-screenshotter/web/src/routes/+page.server.ts:4:16) at Module.load_server_data (/Users/tylermcrobert/Sites/are.na-screenshotter/web/node_modules/.pnpm/@sveltejs+kit@2.5.10_@sveltejs+vite-plugin-svelte@3.1.0_svelte@5.0.0-next.142_vite@5.2.11/node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js:61:41)

pdelfan commented 2 weeks ago

Hey @tylermcrobert, sorry for an even longer delay and thanks for helping me out. Unfortunately I'm at a max capacity and don't have enough time to work on the API, but I do plan to get back to it sometime in future.