docusign / docusign-esign-node-client

The Official DocuSign Node.js Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
http://docusign.github.io/docusign-esign-node-client
MIT License
144 stars 99 forks source link

Module not found: Can't resolve 'ApiClient' in 'E:\Cflo-webapp\node_modules\docusign-esign\src' #312

Closed SiddheshKukade closed 1 year ago

SiddheshKukade commented 1 year ago

Using code on react frontend

Docusign Version : "docusign-esign": "^5.16.0",

Code :

const uploadEnvelopeGetId = async () => {
    let dsApiClient = new docusign.ApiClient();
    let envelopeArgs = {};
    let accountId = process.env.REACT_APP_DOCUSIGN_ACCOUNT_ID;
....

Code Reffered from : https://www.npmjs.com/package/docusign-esign/v/2.0.1#usage

Error : image

Please help

kollDocuSign commented 1 year ago

@SiddheshKukade It looks like you might be running into the same problem mentioned here: https://stackoverflow.com/questions/59263772/react-app-throwing-error-while-i-am-importing-docusign-esign-module

It mentions " So the issue is that this is client side code and our node.JS npm package can only be used from the server. You can only make the API calls from your server."

I'd also suggest using the DocuSign quickstart as well found here: https://developers.docusign.com/docs/esign-rest-api/quickstart/overview/

SiddheshKukade commented 1 year ago

Thanks @kollDocuSign that helped a lot !