Cordobo / angularx-qrcode

A fast and easy-to-use Angular QR Code Generator library with Ivy support
https://cordobo.github.io/angularx-qrcode/
MIT License
469 stars 125 forks source link

Module import error - "value could not be determined statically" #125

Closed cbejensen closed 2 years ago

cbejensen commented 3 years ago

I am using Angular 11. When I try to import the QRCodeModule, it seems to work in dev, but when trying to build for production I get this error:

error NG1010: Value at position 25 in the NgModule.imports of DataCaptureModule is not a reference

  Value could not be determined statically.

 64   imports: [
               ~
 65     CommonModule,
    ~~~~~~~~~~~~~~~~~
... 
 90     QRCodeModule,
    ~~~~~~~~~~~~~~~~~
 91   ],
    ~~~

  libs/data-capture/src/lib/data-capture.module.ts:90:5

    90     QRCodeModule,
           ~~~~~~~~~~~~
    Unknown reference.

Here's my package.json deps for reference:

{
  "dependencies": {
    "@angular/animations": "11.2.8",
    "@angular/cdk": "^11.2.6",
    "@angular/common": "11.2.8",
    "@angular/compiler": "11.2.8",
    "@angular/core": "11.2.8",
    "@angular/forms": "11.2.8",
    "@angular/localize": "11.2.7",
    "@angular/material": "^11.2.6",
    "@angular/platform-browser": "11.2.8",
    "@angular/platform-browser-dynamic": "11.2.8",
    "@angular/router": "11.2.8",
    "@danielmoncada/angular-datetime-picker": "^11.0.0",
    "@ngneat/until-destroy": "^8.0.2",
    "@ngrx/component-store": "11.0.0",
    "@ngrx/effects": "11.0.0",
    "@ngrx/entity": "11.0.0",
    "@ngrx/router-store": "11.0.0",
    "@ngrx/store": "11.0.0",
    "@nrwl/angular": "12.0.0",
    "angular-gridster2": "^11.1.4",
    "angularx-qrcode": "^11.0.0",
    "bootstrap-scss": "^4.3.1",
    "conversions": "^1.5.2",
    "core-js": "^2.5.4",
    "event-source-polyfill": "^1.0.5",
    "lodash-es": "^4.17.15",
    "moment": "^2.22.2",
    "ngx-filesize": "^2.0.1",
    "ngx-json-viewer": "^2.4.0",
    "ngx-moment": "^3.2.0",
    "ngx-pipes": "^2.6.0",
    "print-js": "^1.0.63",
    "rxjs": "^6.6.7",
    "tslib": "^1.10.0",
    "uom": "^2.3.0",
    "uuid": "^8.3.2",
    "zone.js": "^0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "0.1102.7",
    "@angular-eslint/eslint-plugin": "^2.0.2",
    "@angular-eslint/eslint-plugin-template": "^2.0.2",
    "@angular-eslint/template-parser": "^2.0.2",
    "@angular/cli": "11.2.7",
    "@angular/compiler-cli": "11.2.8",
    "@angular/language-service": "11.2.8",
    "@ngrx/schematics": "11.0.0",
    "@ngrx/store-devtools": "11.0.0",
    "@nrwl/cli": "12.0.0",
    "@nrwl/eslint-plugin-nx": "12.0.0",
    "@nrwl/jest": "12.0.0",
    "@nrwl/linter": "12.0.0",
    "@nrwl/tao": "12.0.0",
    "@nrwl/workspace": "12.0.0",
    "@testing-library/angular": "^10.4.2",
    "@types/jest": "^26.0.22",
    "@types/lodash-es": "^4.17.3",
    "@types/node": "14.14.33",
    "@types/pdfjs-dist": "^2.1.2",
    "@types/uuid": "^8.3.0",
    "@typescript-eslint/eslint-plugin": "4.19.0",
    "@typescript-eslint/parser": "4.19.0",
    "dotenv": "8.2.0",
    "eslint": "7.22.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-import": "latest",
    "eslint-plugin-rxjs": "^3.1.4",
    "eslint-plugin-testing-library": "^3.10.2",
    "eslint-plugin-unused-imports": "^1.1.1",
    "husky": "^4.2.1",
    "jest": "26.6.3",
    "jest-preset-angular": "^8.4.0",
    "jira-prepare-commit-msg": "^1.5.2",
    "lint-staged": ">=8",
    "nginx-conf": "^2.0.0",
    "npm-run-all": "^4.1.5",
    "prettier": "2.2.1",
    "ts-jest": "26.5.4",
    "ts-node": "9.1.1",
    "typescript": "4.1.4",
    "webpack-bundle-analyzer": "^4.4.0"
  }
}
ayyoubmiftah commented 3 years ago

?

Cordobo commented 2 years ago

Hi @cbejensen

Did you ever manage to fix that? I can't reproduce the error based on the data you provided.

Please reopen if you think this was closed by error and provide a minimalist repo to reproduce this. Thank you!