BenjaminBrandmeier / angular2-image-gallery

Image Gallery built with Angular 18+, node.js and GraphicsMagick
https://oidamo.de/blog/gallery-demo
MIT License
305 stars 106 forks source link

'gallery' is not a known element #90

Closed 1nv1n closed 2 years ago

1nv1n commented 4 years ago

This is the full error:

ERROR in projects/nvn-website/src/app/features/builds/builds/builds.component.html:2:5 - error NG8001: 'gallery' is not a known element:
    1. If 'gallery' is an Angular component, then verify that it is part of this module.
    2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

    2     <gallery>
          ~~~~~~~~~

      projects/nvn-website/src/app/features/builds/builds/builds.component.ts:10:16
        10   templateUrl: './builds.component.html',
                          ~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component BuildsComponent.

I've imported the module in core.module.ts. What am I missing?

If I import Angular2ImageGalleryModule in the component I want to use it on, I get the error on #79:

ERROR Error: "Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.

I'm using this: https://github.com/tomastrajan/angular-ngrx-material-starter as the base for my project. Dependencies:

  "dependencies": {
    "@angular-extensions/elements": "~9.1.0",
    "@angular-extensions/model": "^8.1.0",
    "@angular/animations": "~9.1.0",
    "@angular/cdk": "~9.1.0",
    "@angular/common": "~9.1.0",
    "@angular/compiler": "~9.1.0",
    "@angular/core": "~9.1.0",
    "@angular/forms": "~9.1.0",
    "@angular/material": "~9.1.0",
    "@angular/platform-browser": "~9.1.0",
    "@angular/platform-browser-dynamic": "~9.1.0",
    "@angular/router": "~9.1.0",
    "@fortawesome/angular-fontawesome": "^0.6.0",
    "@fortawesome/fontawesome-free": "^5.12.1",
    "@fortawesome/fontawesome-svg-core": "^1.2.27",
    "@fortawesome/free-brands-svg-icons": "^5.12.1",
    "@fortawesome/free-solid-svg-icons": "^5.12.1",
    "@ngrx/effects": "~9.1.0",
    "@ngrx/entity": "~9.1.0",
    "@ngrx/router-store": "~9.1.0",
    "@ngrx/store": "~9.1.0",
    "@ngrx/store-devtools": "~9.1.0",
    "@ngx-translate/core": "^12.0.0",
    "@ngx-translate/http-loader": "^4.0.0",
    "angular2-image-gallery": "^8.0.0",
    "bootstrap": "^4.4.1",
    "browser-detect": "^0.2.28",
    "gm": "^1.23.1",
    "hammerjs": "^2.0.8",
    "onecolor": "^3.1.0",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "uuid": "^3.4.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.901.0",
    "@angular/cli": "~9.1.0",
    "@angular/compiler-cli": "~9.1.0",
    "@angular/language-service": "~9.1.0",
    "@commitlint/cli": "^8.3.5",
    "@commitlint/config-conventional": "^8.3.4",
    "@types/jasmine": "~3.5.3",
    "@types/jasminewd2": "^2.0.8",
    "@types/node": "^12.11.1",
    "@types/uuid": "^3.4.7",
    "all-contributors-cli": "^6.13.0",
    "codelyzer": "^5.1.2",
    "express": "^4.16.4",
    "husky": "^4.2.1",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.4.1",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.1",
    "karma-jasmine": "~3.1.0",
    "karma-jasmine-html-reporter": "^1.5.2",
    "karma-spec-reporter": "^0.0.32",
    "npm-run-all": "^4.1.5",
    "prettier": "^1.19.1",
    "pretty-quick": "^2.0.1",
    "protractor": "^5.4.3",
    "rimraf": "^3.0.2",
    "standard-version": "^7.1.0",
    "ts-node": "~8.6.2",
    "tslint": "~6.0.0",
    "typescript": "~3.7.5",
    "webpack-bundle-analyzer": "^3.6.0"
  }
detrist commented 3 years ago

As a workaround you can try to fix it by disabling the BrowserModule in your app.module.ts file.

BenjaminBrandmeier commented 2 years ago

This should be fixed with the new version 14