An error was encountered at line 7800, character 18 in the three-core.d.ts file in the node_modules/@types/three directory. The error message reads: "Cannot find name 'VRDisplay

I encountered an error in my Angular 6 app while running ng serve

   ERROR in node_modules/@types/three/three-core.d.ts(7800,18): error TS2304: Cannot find name 'VRDisplay'.
node_modules/@types/three/three-core.d.ts(7801,23): error TS2304: Cannot find name 'VRDisplay'.
node_modules/@types/three/three-vrcontrols.d.ts(15,27): error TS2304: Cannot find name 'VRDisplay'.
node_modules/@types/three/three-vreffect.d.ts(20,27): error TS2304: Cannot find name 'VRDisplay'.

Below are the dependencies being used

  "dependencies": {
"@angular/animations": "^6.0.3",
"@angular/cdk": "^6.4.5",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/platform-server": "^6.0.0",
"@angular/router": "^6.0.3",
"@ng-toolkit/serverless": "^1.1.41",
"@ng-toolkit/universal": "^1.1.41-beta.110",
"@nguniversal/express-engine": "^6.0.0",
"@nguniversal/module-map-ngfactory-loader": "^6.0.0",
"@types/aws-lambda": "^8.10.13",
"@types/greensock": "^1.15.32",
"@types/three": "^0.92.17",
"aws-serverless-express": "^3.2.0",
"bootstrap": "^4.1.3",
"core-js": "^2.5.4",
"cors": "~2.8.4",
"cp-cli": "^1.1.0",
"gsap": "^2.0.1",
"hamburgers": "^0.9.3",
"load-google-maps-api": "^1.3.2",
"rxjs": "^6.0.0",
"three": "^0.87.1",
"ts-loader": "4.2.0",
"webpack-cli": "^2.1.4",
"zone.js": "^0.8.26"
},

Previously, there were no issues with this setup. I have tried running npm install but the problem persists. Reverting to an old version of node_modules allows it to compile successfully, indicating a potential package-related issue rather than a Typescript configuration problem.

Answer №1

VRDisplay can be found in the dom standard library within TypeScript 2.8 and later versions. Make sure to verify your current TypeScript version. If you have an older node_modules directory that contains a previous version of @types/three before the inclusion of VRDisplay, it might still work properly.

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

IntelliJ fails to detect Angular Material HTML tags

Embarking on a new project from scratch using Angular 5 and Angular Material. Encountering an issue with IntelliJ not recognizing Angular Material HTML tags: import {BrowserModule} from '@angular/platform-browser'; import {NgModule} from &apos ...

Child component in Angular2 makes an observer call to its parent object

Let me try to explain this in the best way possible. I have a service that includes an observable class responsible for updating itself. This observable class needs to be pushed out to the app using the observer within the service. How can I trigger that ...

The animation glitches out when attempting to update the color of the imported model

I'm facing an issue with a Blender model that has animation. After uploading it to the site, the animation works perfectly. However, I'm trying to change the body color of the model, and when I attempt to do so, the body stops animating and becom ...

What is the best way to transfer information between different stages within the stepper component?

Is there a way to seamlessly pass data between different steps of the stepper component? For instance, in the following code snippet, I aim to have the information entered in app-step1 form easily accessible within the app-step2 component. <mat-horizo ...

Currently, I am working on integrating the ngx-bootstrap datepicker feature into my project

I'm currently working on integrating the ngx-bootstrap datepicker and would like to display the months as Jan, Feb, Mar, Apr instead of January, February. How can I achieve this customization? ...

Expand the data retrieved from the database in node.js to include additional fields, not just the id

When creating a login using the code provided, only the user's ID is returned. The challenge now is how to retrieve another field from the database. I specifically require the "header" field from the database. Within the onSubmit function of the for ...

Exploring Vue 3.3: Understanding Generics and Dynamic Properties

I'm currently diving into the generics feature in vue 3.3 and I've been pondering about defining the type of an incoming prop based on another prop value. This is my current component structure: export interface OptionProps { id: string | numb ...

Troubleshooting IONIC 4: Task failed to execute the dex archive transformation with external libraries merger for the debug version

I need help with my ionic 4 app development. I keep encountering an error whenever I try to build the android app. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMerg ...

Slim and Angular2 htaccess configuration

I am encountering an issue with my htaccess file and could use some assistance. My setup includes an Angular2 app (single page client side app, index.html) and a slim-v3 PHP REST API (index.php). The Angular2 app interacts with the REST API, and I would id ...

Deleting data from Firebase in Angular can be easily done using the AngularFire library. By

I am attempting to remove specific values from my Firebase database. I need to delete this entry from Firebase: https://i.stack.imgur.com/CAUHX.png So far, I have tried using a button to trigger the delete function like this: <div class="single-bfunc ...

Tips for making a oneOf field nullable using TypeScript and AJV

A field named platform exists in my code, and it can hold either a string or an array of strings (string[]). The field can also be nullable or undefined if not passed as input. TypeScript Interface export interface IEntityLeaderboardQuery { rank: stri ...

What is the best way to hide the back arrow in Cordova UWP for Ionic 4?

I am currently developing a Windows 10 (UWP) application using Ionic 4 (Angular). I want to remove the back arrow from the interface: Example of back arrow I have attempted various solutions, such as implementing in the app.component constructor with in ...

Is it necessary to 'type assert' the retrieved data in Axios if I have already specified the return type in the function declaration?

Consider the code snippet below: import axios from 'axios' async function fetchAPI<T>(path: string, data: any): Promise<T> { return (await axios.get(path, data)).data as T } async function getSomething(): Promise<SomeType> { ...

Understanding the infer keyword in Typescript when working with generic type constraints

Exploring a scenario where I have a generic interface that requires a type argument extending another generic type. export interface IPoint<TX, TY> { x: TX; y: TY; } export interface ISeries<TPoint extends IPoint> { points: Array& ...

Using Angular 8.x for routing with customized outlet names

I am attempting to set up routing in my Angular 8.x application, utilizing lazy loading and named outlets. Here is the current configuration: main-layout.html <header> <app-top-menu></app-top-menu> </header> <mat-sidenav-cont ...

Unable to load dynamic JSON data in ag-grid for Angular 2

ngOnInit(){ this.gridOptions = {}; this.gridOptions.rowData = []; this.gridOptions.rowData = [ {configName: 1, configName1: "Jarryd", configName2: "Hayne", configName3: "tttttt", configName4: "rrrtttt", configName5:"drrrrrr"}]; } ...

The TypeScript error occurs when trying to set the state of a component: The argument 'X' cannot be assigned to the parameter of type '() => void'

When I attempt to call setState, I encounter a TypeScript error. Here is the code snippet causing the issue: updateRequests(requests: any, cb:Function|null = null) { this.setState( { requests: { ...this.state.requests, ...

How can one create a walking person animation using Blender, and what are the necessary coding procedures to export it as a JSON file?

I am in need of displaying a walking person animation on a web page using a character model created in Blender and saved as a JSON file. Can you provide me with detailed steps on how to achieve this? Thank you, ASH ...

Problem encountered with ESLint when utilizing babel module-resolver in conjunction with TypeScript

Typescript is not making type inferences with resolved imports, but it does with relative imports. Any assistance would be greatly appreciated. https://i.sstatic.net/2pgHX.png When using the 'useTheme' function, an error is displayed: "U ...

Can someone share with me the best practices for implementing @HostListener within a method in my Angular 16 project?

Currently, I've been involved in developing a Single Page Application using Angular 16, TypeScript, and The Movie Database (TMDB). My task at hand is to implement the "infinite scroll" functionality on a particular component. To achieve this, I have ...