Error in connect-streams.js: Cannot set property 2011-06-15 of [object Object]
See original GitHub issueI have integrated Amazon Connect Streams (through NPM) to Angular 9 project and everything worked as a charm, but after transferring all of the code from child to parent folder and running ng serve
again I got this error.
connect-streams.js:20985 Uncaught TypeError: Cannot set property 2011-06-15 of [object Object] which has only a getter
at Object.push../node_modules/amazon-connect-streams/release/connect-streams.js.107.../apis/connect-2017-02-15.min (connect-streams.js:20985)
at o (connect-streams.js:4)
at r (connect-streams.js:4)
at Object../node_modules/amazon-connect-streams/release/connect-streams.js (connect-streams.js:4)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.module.ts (app.module.ts:1)
at __webpack_require__ (bootstrap:79)
at Module../src/main.ts (main.ts:1)
at __webpack_require__ (bootstrap:79)
at Object.0 (main.ts:12)
Error is caused by this line in connect-streams.js:
AWS.apiLoader.services['sts']['2011-06-15'] = require('../apis/sts-2011-06-15.min');
"typescript": "^3.9.6"
"amazon-connect-streams": "^1.4.9"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Cannot set property 2011-06-15 of #<Object> which has only ...
It's not a pretty solution, but I solved the error by downloading the following amazon-connect-streams release file and commenting out the code ...
Read more >Typescript: can't augment namespace - Stack Overflow
I'm using "amazon-connect-streams" npm package. The package has a few mismatches between the type definition and the javascript runtime.
Read more >Embedding The Amazon Connect CCP in Angular - 5K Team
First, you will need to update the app's dependencies to include Amazon Connect Streams library. For this you can install via npm: "npm ......
Read more >I use the Amazon Connect Streams API
using your AWS account. Navigate to the Amazon Connect console. Check that you're in the correct Region for your Amazon Connect instance.
Read more >Amazon Connect Streams API Changelog #1: Through May ...
Amazon Connect Streams API (Streams) allows developers to create custom ... methods are in the api.js file, hanging off the agent object.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try importing amazon-connect-streams asynchronously in the ngOnInit() method.
This way you avoid the initial TypeError (and possibly a follow-up window reference error). That’s how i got it to work with Angular 9 and Angular 10.
Still facing this issue when I import as the
es
way.So I use
script
to import the sdk directly in thehtml
. Worked as expected!