We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

sara81's avatar
sara81
Helpful | Level 5
2 years ago

Can't resolve './aes' error when using @dropbox/sign

Node: 18.17.1

@dropbox/sign: 1.1.3

 

Hi,

 

when I try to use the sdk I get the following error:


- error ./node_modules/@dropbox/sign/dist/api.js
Module not found: Can't resolve './aes'

The error comes from this simple piece of code:

 

import * as DropboxSign from '@dropbox/sign';

const signatureRequestApi = new DropboxSign.SignatureRequestApi();

 

Would be very greatful for any help on this.

 

Best,

S

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Engineer rankDropbox Engineer

    Hi there,

     

    Just a few questions, for you:

    • Did you install the DropboxSign API using npm?
    • Are you using a front-end library, such as React? 
    • Are you using a framework such as Vue or NextJS?

     

    • sara81's avatar
      sara81
      Helpful | Level 5

      Hi, 

       

      to answer your questions.
      1) I am using npm 9.6.7
      2) I'm triggering this code from an api route in Next.js.

      3) I'm using Next.js 13.4.19

      FYI: I got the same behavior using node 20 as 18.

      • DB-Des's avatar
        DB-Des
        Icon for Dropbox Engineer rankDropbox Engineer

        Hello,

         

        The reason you are seeing that error is because the Dropbox Sign Node SDK uses Node.js specific modules, or modules that are not available on the client side.

         

        You can address that issue by looking into NextJS' getStaticProps, getStaticPaths or getServerSideProps functions.

         

        References:

         

        Hope this helps!