Error TS2304: The identifier 'Map' is not recognized within the context of [email protected]

To recreate the issue, follow these steps:

  1. Create a new directory and navigate into it using the command mkdir and cd.
  2. Initialize npm by running npm init and accepting the defaults.
  3. Run jspm init, accepting the defaults but avoiding the use of a transpiler.
  4. Install Aurelia framework with the command jspm install aurelia-framework.
  5. Next, install Aurelia bootstrapper by running
    jspm install aurelia-bootstrapper
    .
  6. Add an empty file named tsconfig.json to the directory. Although different configurations have been attempted without success, even a basic configuration like { } did not resolve the issue. Several variations based on the sample here were also unsuccessful.
  7. Compile TypeScript with the command tsc.

The following errors should arise at this point:


jspm_packages/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5b3a2e293e37323a763932353f32353c1b6a756b756b76393e2f3a756a7568756d">[email protected]</a>/aurelia-binding.d.ts(331,25): error TS2304: Cannot find name 'Map'.
jspm_packages/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fb9a8e899e97929ad69992959f92959cbbcad5cbd5cbd6999e8f9ad5cad5c8d5cd">[email protected]</a>/aurelia-binding.d.ts(353,49): error TS2304: Cannot find name 'Map'.

This could indicate a missing dependency.

Additionally, TS2304 errors in other files may be present during reproduction, although they are not observed in the usual environment for unknown reasons.

Attempts to import the typings.json file from here, followed by running typings install, did not yield any changes. Even trying `typings install es6-promise --save' did not help.

No matter what methods have been employed, the same errors persist upon running tsc.

The current versions being used are as follows...

  • npm v3.9.0
  • jspm v0.16.34
  • tsc v1.8.10

Any assistance would be highly valued.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The value of the local variable remained unchanged despite the occurrence of global events (window.onresize)

The value of the local variable remained unchanged despite global events (window.onresize) occurring. export class TestComponent implements OnInit { a: number = 0; b: number = 0; ngOnInit() { window.onresize = () => { ...

Angular: encountering template parse errors with unknown <component> element

I'm struggling to import a component into another component, but the imported component cannot be found. Here is the error message: Uncaught Error: Template parse errors: 'aktenkorrespondenzenTemplate' is not a known element: 1. If 'ak ...

How can I implement a bootbox alert in Typescript/Angular2?

Trying to incorporate Bootbox into my Angular2 project has proven to be a challenge. Despite extensive searching, I have been unable to find a satisfactory solution. I experimented with using angular2-modal as an alternative, but encountered numerous ...

Jest is consistently encountering errors when trying to parse a JSON file located within the node_modules folder

I've been having trouble setting up my jest.config.js file to run tests on a TypeScript Vuejs app. Jest is throwing an error about encountering an unexpected token while parsing a JSON file in the node_modules folder. I'm not sure why this is hap ...

Manifest for npm module

After releasing my first npm package, I realized that I needed to implement a declaration file ("*.d.ts") when integrating it into one of my projects. Despite multiple attempts, I have not been able to successfully integrate it and have spent days trying t ...

Angular and Spring setup not showing data despite enabling Cross Origin Support

I'm currently in the process of developing a full stack application using Spring and Angular. After successfully setting up my REST APIs which are functioning properly on port 8080, I encountered an issue when trying to access them from my frontend ( ...

Disable and grey out the button while waiting for the Observable to broadcast successfully

component.html <button mat-raised-button color="primary" type="submit"> <mat-icon>account_box</mat-icon> <span *ngIf="!loading">&nbsp;&nbsp;&nbsp;Register</span> <span * ...

Manage InversifyJS setup based on the current environment

Recently, I've been utilizing InversifyJS to manage dependency injection within my TypeScript server. A current challenge I face is the need to inject varying implementations into my code based on the environment in which it is running. A common situ ...

Display an alert message only the first time a checkbox is checked

I have a checkbox that, when checked, triggers an alert asking if the user is sure. Upon agreement, all exercises are marked as done. The problem: I use local storage to save an item called didAllExercises. When reopening the app, if this item is true, th ...

Tips for efficiently calling a function without the need to check if it exists beforehand

I'm looking for a way to access the formik props outside of the form without constantly checking if a function exists before calling it when using refs. Any suggestions on how to achieve this? function BasicInfo({ event, initialValues, onSubmi ...

Backend images are failing to load

I'm facing an issue where the image I send from a nestjs backend to an angular frontend isn't displaying in the browser. https://i.sstatic.net/nicu4.png Here's how it works: I make a request from the frontend to the backend with the file p ...

Record audio without relying on Mediarecorder

I am combining two AudioBuffers to form a single one. I believe this can be done without using the MediaRecorder, as real-time recording is not required. This is my current approach: concatenateAudio(buffers: AudioBuffer[]): void { const totalLength ...

A beginner's guide to integrating with oauth1 service using Angular

When trying to authenticate the user of my web app with Trello, which uses oauth1 authentication, I noticed that the oauth library recommended in their demo project does not have typings. What would be the most suitable alternative for authenticating my ...

"Implementing Ionic 2 tabs allows for retrieving the previously selected option with the

Here is the code I am currently working on: onTabsChange(abc) { let selected_tab = this.tabs.getSelected(); let tab_index = selected_tab.index; console.log(tab_index); // should print current tab index but it prints previously selected tab index ...

Unable to locate the identifier 'componentDidUpdate' for a React component using Typescript

Is it possible to utilize componentDidUpdate or any other component with Typescript? The function does not seem to be recognized in my program. However, useEffect() works perfectly fine. ...

Steps for assigning a parameter to a general purpose function

Having a generic function named retrieve: function retrieve<T>(endpoint: string, id: string, /* etc */): T {} The goal is to define a function like retrieveUser, which binds the first parameter and specifies T. An attempt was made using Function.pr ...

Is there a way to stop typescript from automatically assigning a generic as a literal number value?

Trying to develop a class that allows for both hex and rgb color options has presented a challenge. When using hex values, the generic is forced to be a literal number instead of just a number. For example, specifying 0xff00ff results in it being defined a ...

Angular 9: Trouble encountered with utilizing custom error handler for error instances

I'm currently working on implementing a custom error handling system in Angular using the ErrorHandler class. This is what my Globalerror service looks like: export class CustomErrors extends Error { button?: any; errObject: any; constructor() ...

Error message displaying Angular Service not able to be injected into component: StaticInjectorError in AppModule

I'm currently attempting to inject a SpotifyService service into a SearchComponent component, where the service requires Http as a parameter. Below is my module setup: @NgModule({ imports: [ BrowserModule, FormsModule, RouterModule ], decla ...

When typing declarations are used, they clarify whether the entity being referenced is an Object or

I am currently working on aligning the Dockerode run typings to match the actual implementation. The issue arises when I invoke run as TypeScript consistently identifies the return value as a Promise. It seems that TypeScript is having trouble distinguish ...