npm – AWS Javascript SDK – Browserify Error: Can’t walk dependency graph: ENOENT: no such file or directory, lstat
AWS JavaScript SDK (v3) is available as node modules.
However, I need to use them in HTML/browser.
Consider the following AWS SDK:
github.com/aws/aws-sdk-js-v3
These are node modules.
I need to generate a minified javascript bundle for use in html/browser like this:
<script src="bundle.js></script>;
Specifically, I want to generate bundle for only one of the client node modules there:
aws-sdk-js-v3/clients/client-appsync
I have tried the following:
mydir> npm install @aws-sdk/client-appsync
mydir> npm install --global browserify
mydir> browserify --require @aws-sdk/client-appsync --outfile client-appsynch-out.js
However, that results in error message:
Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat 'mydir\process'
required by mydir\node_modules\@aws-sdk\util-user-agent-node\dist-cjs\index.js
In general, how do I generate plain javascript bundles from aws javascript sdk v3.
Alternatively:
Is there a CDN somewhere that hosts all these javascript files – that we can directly use?
Read more here: Source link
