Skip to content
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

Parcel gets stuck when bundling aws-sdk-js-v3 #1529

Closed
trivikr opened this issue Sep 16, 2020 · 2 comments
Closed

Parcel gets stuck when bundling aws-sdk-js-v3 #1529

trivikr opened this issue Sep 16, 2020 · 2 comments

Comments

@trivikr
Copy link
Member

trivikr commented Sep 16, 2020

Describe the bug
Parcel gets stuck at Built in when bundling aws-sdk-js-v3

SDK version number
1.0.0-gamma.9

Is the issue in the browser/Node.js/ReactNative?
Node.js

Details of the browser/Node.js/ReactNative version
v14.9.0

To Reproduce (observed behavior)

package.json
{
  "dependencies": {
    "@aws-sdk/client-dynamodb": "1.0.0-gamma.9"
  },
  "devDependencies": {
    "parcel": "1.12.4"
  }
}
Code
const { DynamoDB } = require("@aws-sdk/client-dynamodb");

(async () => {
  const client = new DynamoDB({});
  console.log(await client.listTables({ Limit: 1 }));
})();
Output
$ ./node_modules/.bin/parcel --version
1.12.4

$ ./node_modules/.bin/parcel index.js 
Server running at http://localhost:65263 - configured port 1234 could not be used.
⚠️  Could not load source file "../../src/index.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/index.js".
⚠️  Could not load source file "index.ts" in source map of "node_modules/@aws-crypto/ie11-detection/build/index.js".
⚠️  Could not load source file "../../src/credentialDerivation.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/credentialDerivation.js".
⚠️  Could not load source file "../../src/SignatureV4.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/SignatureV4.js".
⚠️  Could not load source file "MsWindow.ts" in source map of "node_modules/@aws-crypto/ie11-detection/build/MsWindow.js".
⚠️  Could not load source file "../../src/constants.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/constants.js".
⚠️  Could not load source file "../../src/getCanonicalHeaders.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/getCanonicalHeaders.js".
⚠️  Could not load source file "../../src/getCanonicalQuery.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/getCanonicalQuery.js".
⚠️  Could not load source file "../../src/getPayloadHash.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/getPayloadHash.js".
⚠️  Could not load source file "../../src/hasHeader.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/hasHeader.js".
⚠️  Could not load source file "../../src/moveHeadersToQuery.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/moveHeadersToQuery.js".
⚠️  Could not load source file "../../src/prepareRequest.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/prepareRequest.js".
⚠️  Could not load source file "../../src/utilDate.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/utilDate.js".
⚠️  Could not load source file "../../src/cloneRequest.ts" in source map of "node_modules/@aws-sdk/signature-v4/dist/es/cloneRequest.js".
✨  Built in 17.50s.

The transpiled JS files are emitted in dist folder, but they throw error when run:

Output
$ ls dist
index.js        index.js.map

$ node dist/index.js
/Users/trivikr/workspace/parcel-demo/dist/index.js:116
    throw error;
    ^

ReferenceError: regeneratorRuntime is not defined
    at Object.parcelRequire.index.js.@aws-sdk/client-dynamodb (/Users/trivikr/workspace/parcel-demo/dist/index.js:24494:33)
    at newRequire (/Users/trivikr/workspace/parcel-demo/dist/index.js:47:24)
    at /Users/trivikr/workspace/parcel-demo/dist/index.js:81:7
    at Object.<anonymous> (/Users/trivikr/workspace/parcel-demo/dist/index.js:120:3)
    at Module._compile (internal/modules/cjs/loader.js:1075:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1096:10)
    at Module.load (internal/modules/cjs/loader.js:940:32)
    at Function.Module._load (internal/modules/cjs/loader.js:781:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

Expected behavior
The app using aws-sdk-js-v3 gets bundled with parcel

Additional context
Created as a follow-up to #1504

@github-actions
Copy link

github-actions bot commented Oct 9, 2021

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.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Oct 9, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants