Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR in Cannot resolve type entity i9.NgxFileDropModule to symbol

I have migrated angular 8 to version 10. Application is using custom angular library which is also being migrated from version 7 to 10. this library has NgxFileDropModule which is imported as

(import { NgxFileDropModule } from 'ngx-file-drop';)

but the error is thrown in main application ERROR in Cannot resolve type entity i9.NgxFileDropModule to symbol How do I get rid of this issue P.s. library is compiled and built well but main application throws error which has dependency on library

like image 442
Parul Avatar asked Nov 16 '22 04:11

Parul


1 Answers

I've had a similar problem while having the library locally sourced using file: package target. My solution was to set projects.PROJECTNAME.architect.build.options.preserveSymlinks to true.

e.g.

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "PROJECTNAME": {
      "projectType": "application",
      "schematics": {
        // ...
      },
      // ...
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            // ...
            "scripts": [],
            "preserveSymlinks": true // <-- This line here
          }
          // Remaining configuration...
like image 180
Francesco Cattoni Avatar answered Dec 28 '22 10:12

Francesco Cattoni