question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReferenceError: Map is not defined

See original GitHub issue

The latest change has caused the SDK to cease working on my device due to the use of the ES6 Map type:

ERROR:    var activeSubscriptions = new Map();                                                                                                                                                    
   ERROR:                               ^                                                                                                                                                         
ERROR: ReferenceError: Map is not defined                                                                                                                                                         
    at new DeviceClient (/home/root/.node_app_slot/node_modules/aws-iot-device-sdk/device/index.js:232:34)                                                                                        
    at Object.DeviceClient [as device] (/home/root/.node_app_slot/node_modules/aws-iot-device-sdk/device/index.js:164:14)                                                                         
    at Object.<anonymous> (/home/root/.node_app_slot/main.js:11:21)                                                                                                                               
    at Module._compile (module.js:456:26)                                                                                                                                                         
    at Object.Module._extensions..js (module.js:474:10)                                                                                                                                           
    at Module.load (module.js:356:32)                                                                                                                                                             
    at Function.Module._load (module.js:312:12)                                                                                                                                                   
    at Function.Module.runMain (module.js:497:10)                                                                                                                                                 
    at startup (node.js:119:16)                                                                                                                                                                   
    at node.js:935:3     

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
gkwickercommented, Apr 12, 2016

@jdelaune, yes you can install the previous version with ‘npm install aws-iot-device-sdk@1.0.10’. That version doesn’t include any ES6 types. These will be removed from the next release. Thanks for using AWS IoT.

2reactions
typemismatchcommented, Apr 12, 2016

Try npm install aws-iot-device-sdk@1.0.10

Read more comments on GitHub >

github_iconTop Results From Across the Web

Map() is not defined in Google Chrome - javascript
I've been searching for an answer but I'm only getting results regarding the Google maps API. I ...
Read more >
Uncaught ReferenceError: Map is not defined at line #617
I added the server.bundle.js and this error showed up. Upon looking at the bundle I figured out that it came from this line, ......
Read more >
[JDK-8194738] ReferenceError: "Map" is not defined
ReferenceError : "Map" is not defined ... Resolution: Not an Issue. Affects Version/s: 9.0.1. Fix Version/s: None. Component/s: core-libs. Labels:.
Read more >
Uncaught ReferenceError: google is not defined | WordPress.org
Hi @shampie,. This seems a dependency issue with Google Maps, are you using the Script Center by any chance? We can add a...
Read more >
TypeError: object.map is not a function in JavaScript
The "object.map is not a function" error occurs because the map method is not implemented on objects. To iterate over an object, use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found