node.jsreactjsdocusignapi

React app throwing error while i am importing docusign-esign module


create a react app

create-react-app demodocusign

Then install docusign-esign using npm.

npm install docusign-esign

Then import docusign in your app.js

const docusign = require("docusign-esign");

or

import docusign from "docusign-esign"

Then start the app

npm start 

Then see the console or terminal ,its saying Module not Found Can't resolve 'ApiClient'

Note-Its working in Node express server but if i try to do the same thing in react ,it is throwing error


Solution

  • 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.