code-examples-node
code-examples-node copied to clipboard
Next.js 13 not working with docusign API Client:
I have create a basic repo to recreate and demonstrate the issue: https://github.com/fullStackRyan/next-docusign-example-problem
Clone the repo.
npm install
npm run dev
using POSTMAN do a POST to http://localhost:3000/api/docusign
Next is a fullstack framework anything within app/api with a file route.ts is considered the server side from my understanding.
- error ./node_modules/docusign-esign/src/index.js
Module not found: Can't resolve 'ApiClient'
Did you mean './ApiClient'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\Users\RMcAvoy\code\next-docusign-example-problem).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
https://nextjs.org/docs/messages/module-not-found
Would you like to try a workaround from https://github.com/docusign/docusign-esign-node-client/issues/332#issuecomment-1799289882?
I am also experiencing this issue. The workaround did not fix the error for me.