alchemyplatform / aa-sdk

https://www.alchemy.com/account-abstraction
MIT License
231 stars 125 forks source link

Failed to resolve entry for package "@alchemy/aa-signers" on React + Vite #327

Open jmsm412 opened 11 months ago

jmsm412 commented 11 months ago

[REQUIRED] Environment

[REQUIRED] Describe the problem

Hello everyone, I'm following the integration instructions for web3auth. Trying to import @alchemy/aa-signers/web3auth does not work as it can't find the directory

Failed to resolve import "@alchemy/aa-signers/web3auth" from "src/App.tsx". Does the file exist?

When I import Web3AuthSigner from @alchemy/aa-signers I get the following error:

[vite] Internal server error: Failed to resolve entry for package "@alchemy/aa-signers". The package may have incorrect main/module/exports specified in its package.json: Missing "." specifier in "@alchemy/aa-signers" package Plugin: vite:import-analysis

I tried using the package on the main project (has some custom configs) and also on a clean vite project, the error is the same for both.

phDooY commented 7 months ago

Same happens when I am trying to import signer as per tutorial here

import { FireblocksSigner } from '@alchemy/aa-signers/fireblocks';

results in error

src/core/providers/fireblocks/fireblocks-aa.signer.ts:1:34 - error TS2307: Cannot find module '@alchemy/aa-signers/fireblocks' or its corresponding type declarations.
moldy530 commented 5 months ago

this seems fixed, are you still seeing this?

you might need to use type: module in your package.json

jmsm412 commented 5 months ago

Hi, yes this has been fixed with the updates.