amplify publish giving error in vite project #13035
Labels
pending-response
Issue is pending response from the issue author
pending-triage
Issue is pending triage
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
18.12.1
Amplify CLI Version
12.0.3
What operating system are you using?
windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no
Describe the bug
'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
file: C:/kaam/ecommerce_startup/web/ec/octotastic/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-imds/dist/es/remoteProvider/httpRequest.js:4:9
2: import { ProviderError } from "@aws-sdk/property-provider";
3: import { Buffer } from "buffer";
4: import { request } from "http";
^
5: /**
6: * @internal
error during build:
Error: '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
my frontend is in vite
Expected behavior
build successful
Reproduction steps
run amlify publish
Project Identifier
b0898beef6b7727ab417e127b3fc94ea
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: