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

Running in aws lambda works once, then fails with 'TypeError: Cannot redefine property: openReadStreamAsync' #520

Open
mrBungalow opened this issue Jan 28, 2021 · 0 comments
Labels

Comments

@mrBungalow
Copy link

Everything works perfectly the first time I run it! Thank you!

The second time I call the lambda (while it is still alive) it bombs out with the following stack trace. Line 5 is just the import: const { Template } = require('@walletpass/pass-js')

offline: Failure: Cannot redefine property: openReadStreamAsync
TypeError: Cannot redefine property: openReadStreamAsync
at Function.defineProperties ()
at Object. (/Users/jboss/dev/backend-service/serverless/node_modules/@walletpass/pass-js/dist/lib/yazul-promisified.js:8:8)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/jboss/dev/backend-service/serverless/node_modules/@walletpass/pass-js/dist/template.js:14:29)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/jboss/dev/backend-service/serverless/node_modules/@walletpass/pass-js/dist/index.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Module.require (internal/modules/cjs/loader.js:965:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/jboss/dev/backend-service/serverless/js/controllers/walletPassHandler.js:5:22)
at Module._compile (internal/modules/cjs/loader.js:1076:30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants