Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 25, 2022 02:51 pm GMT

Vite build failed on project with aws-sdk

Vite work greate on local development.

But I got this error when build.

'request' is not exported by __vite-browser-external, imported by node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-imds/dist/es/remoteProvider/httpRequest.js

The solution is put some script on index.html

<script>var global = global || windowvar Buffer = Buffer || []var process = process || { env: { DEBUG: undefined }, version: [] }</script>

And that's it, all sorted!

Thanks community.


Original Link: https://dev.to/ilumin/vite-build-failed-on-project-with-aws-sdk-14dk

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To