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.

Map() reference error

See original GitHub issue

duktape supports the Javascript Map type, right? Why do I get a reference error when I use it:

Error encountered: sync/test-sync.js
ReferenceError: identifier 'Map' undefined
    at processTestCase (sync/test-sync.js:158)
    at processModule (sync/test-sync.js:136)
    at syncTestModules (sync/test-sync.js:109)
    at runSynchronization (sync/test-sync.js:88)
    at global (sync/test-sync.js:63)
    at [anon] (eval:1)
The terminal process terminated with exit code: 2

For the code line:

var t = new Map();

I recently upgraded to version 2.2.1.

Update

The same happens with Set, while Array works as expected.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tsteinholzcommented, Mar 23, 2021

@mike-lischke I was able to work around this by using the ‘es6-shim’ package: import { Map } from 'es6-shim'; prior to the import that called the Map constructor.

0reactions
mike-lischkecommented, May 30, 2018

Yes, sure, but it hasn’t even come to my mind that such standard types wouldn’t be available. I use them constantly in other projects and feel quite limited without them 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught ReferenceError: Map is not defined at line #617
Hi! It's been resolved now. I just have to add this on Configure: engineSwitcher.EngineFactories.AddChakraCore() .AddV8(); ...
Read more >
object not defined when trying to initialize a map in a class ...
Both shouldn't work, you need to add this , to refer to the object properties. ... const keyboard = new Keyboard() console.log(keyboard).
Read more >
Uncaught ReferenceError: tt is not defined
Hi everyone, i have this error while i try to build my code: ... query: query }) .go() .then(function(response) { map = tt.map({...
Read more >
Google Maps API v3 - Uncaught ReferenceError - OutSystems
I'm trying to create a Google Map in a webscreen but I keep getting this error in Chrome's Javascript Console : "Uncaught ReferenceError:...
Read more >
Error Messages | Maps JavaScript API - Google Developers
This page describes the error messages that can be returned by the Maps JavaScript API. The Maps JavaScript API writes error and warning...
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