-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to bundle with rollup for Lambda deployment #1164
Comments
Generally speaking it seems that some bundlers might have issues with the |
Hi @monken Can you elaborate which |
The immediate |
All AWS SDK v3 packages are exported as ESM in 1.0.0-gamma.3 However, a new error appears with rollup using @aws-sdk/client-sts@1.0.0-gamma.3 @aws-sdk/protocol-http (imported by node_modules/@aws-sdk/client-sts/dist/es/protocols/Aws_query.js)
[!] Error: 'parse' is not exported by node_modules/fast-xml-parser/src/parser.js, imported by node_modules/@aws-sdk/client-sts/dist/es/protocols/Aws_query.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/@aws-sdk/client-sts/dist/es/protocols/Aws_query.js (4:9) Code in https://github.com/trivikr/js-sdk-v3-rollup/tree/gamma |
Also getting the same error when bundling with Rollup. Any ideas on how to fix?
|
I've since switched to https://esbuild.github.io/ which can deal with @AWS-SDK just fine (and is blazingly fast). |
Revisiting this issue while examining xml-parser issues. Tested rollup bundling with The new error is due to v4 from uuid: Error: 'v4' is not exported by node_modules/uuid/index.js, imported by node_modules/@aws-sdk/middleware-retry/dist/es/defaultStrategy.js
at error (/Users/trivikr/workspace/js-sdk-v3-rollup/node_modules/rollup/dist/shared/rollup.js:161:30)
at Module.error (/Users/trivikr/workspace/js-sdk-v3-rollup/node_modules/rollup/dist/shared/rollup.js:15027:16) |
Error when using [build:bundles] [!] Error: 'parse' is not exported by node_modules\fast-xml-parser\src\parser.js, imported by node_modules\@aws-sdk\client-sts\dist\es\protocols\Aws_query.js
[build:bundles] https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
[build:bundles] node_modules\@aws-sdk\client-sts\dist\es\protocols\Aws_query.js (5:9)
[build:bundles] 3: import { expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getValueFromTextNode as __getValueFromTextNode, parseRfc3339DateTime as __parseRf
c3339DateTime, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
[build:bundles] 4: import { decodeHTML } from "entities";
[build:bundles] 5: import { parse as xmlParse } from "fast-xml-parser";
[build:bundles] ^
[build:bundles] 6: export var serializeAws_queryAssumeRoleCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
[build:bundles] 7: var headers, body;
[build:bundles] Error: 'parse' is not exported by node_modules\fast-xml-parser\src\parser.js, imported by node_modules\@aws-sdk\client-sts\dist\es\protocols\Aws_query.js
|
using
|
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Describe the bug
I'm trying to use rollup to create a deployable bundle for Lambda.
SDK version number
beta-5
Is the issue in the browser/Node.js?
Node.js
Details of the browser/Node.js version
12
To Reproduce (observed behavior)
Expected behavior
I expect rollup to find and resolve all dependencies.
Screenshots
The text was updated successfully, but these errors were encountered: