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.