docusign / code-examples-node

Node.js code examples and launcher
https://developers.docusign.com/
MIT License
62 stars 52 forks source link

Next.js 13 not working with docusign API Client: #56

Open fullStackRyan opened 1 year ago

fullStackRyan commented 1 year ago

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
jparksecurity commented 7 months ago

Would you like to try a workaround from https://github.com/docusign/docusign-esign-node-client/issues/332#issuecomment-1799289882?

camdressler commented 6 months ago

I am also experiencing this issue. The workaround did not fix the error for me.