@angular/core has no exported member 'Renderer'

See original GitHub issue

When asking general “how to” questions:

Expected Behavior

to compile properly

Current Behavior

When compiling, angular throws the following error:

node_modules/ngx-materialize/src/tooltip/tooltip.directive.d.ts:4:67 - error TS2724: Module '"../../../@angular/core/core"' has no exported member 'Renderer'. Did you mean 'Renderer2'?
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit, Renderer, SimpleChanges } from '@angular/core';
node_modules/@angular/core/core.d.ts:5740:31
        5740 export declare abstract class Renderer2 {
        'Renderer2' is declared here.

Context

  • Running a THREE.js canvas in angular
  • Otherwise nothing special

Your Environment

Here’s my package.json:

{
  "name": "web-renderer3-d",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "clean-install": "rm -f package-lock.json && rm -rf node_modules/ && npm cache clear -f && npm i"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~9.1.3",
    "@angular/common": "~9.1.3",
    "@angular/compiler": "~9.1.3",
    "@angular/core": "~9.1.3",
    "@angular/forms": "~9.1.3",
    "@angular/platform-browser": "~9.1.3",
    "@angular/platform-browser-dynamic": "~9.1.3",
    "@angular/router": "~9.1.3",
    "@avatsaev/three-orbitcontrols-ts": "^0.1.5",
    "@types/three": "^0.103.2",
    "hammerjs": "^2.0.8",
    "materialize-css": "^1.0.0",
    "ngx-materialize": "^6.1.3",
    "rxjs": "~6.5.4",
    "three": "^0.115.0",
    "three-orbitcontrols-ts": "^0.1.2",
    "three-trackballcontrols-ts": "^0.2.1",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.3",
    "@angular/cli": "~9.1.3",
    "@angular/compiler-cli": "~9.1.3",
    "@angular/language-service": "~9.1.3",
    "@types/jasmine": "~3.5.0",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "^5.1.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.0",
    "karma-jasmine": "~3.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "protractor": "~5.4.3",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~3.8.3"
  }
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:12

github_iconTop GitHub Comments

4reactions
vinayr219commented, Sep 26, 2020

facing the same issue here in Angular 10, please resolve this ASAP . had to remove ngx-materialize from project

3reactions
mfettahcommented, Sep 21, 2021

any solution !

Read more comments on GitHub >

github_iconTop Results From Across the Web

node_modules/@angular/core/core"' has no exported member ...
My issue get resolved by adding stable version of ng2-material-dropdown into my package.json as below : enter image description here.
Read more >
Errors: has no exported member - Angular - EJ 2 - Syncfusion
Errors: has no exported member ... },. When I run "ng serve", I'm getting tons of errors like this: Error: node_modules/@syncfusion/ej2-angular- ...
Read more >
node_modules/ng-mdb-pro/index&quot - MDBootstrap
Topic: /node_modules/ng-mdb-pro/index"' has no exported member &#039 ... from '@angular/core'; import { FullscreenOverlayContainer, ...
Read more >
angular/core/core.d.ts - UNPKG
The CDN for @angular/core. ... Emulated` and the component has no `styles`. 910, * or `styleUrls` specified, ... To make it a member...
Read more >
Renderer to Renderer2 migration - Angular
The Renderer class has been marked as deprecated since Angular version 4. This section provides guidance on migrating from this deprecated API to...
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