4

I recently upgraded out Angular 8 application, to Angular 9, using the following commands:

ng update @angular/core@8 @angular/cli@8
ng update @angular/core @angular/cli

The only package that manually needed changes, was ngx-store to ngx-store-9, which I did with the following commands:

npm uninstall ngx-store
npm install ngx-store-9

I then went ahead and changed all of the import statements for ngx-store to ngx-store-9.

I am now receiving the following error when I build my app:

ERROR in ./src/app/models/companySearchCriteria.ts Module build failed (from ./node_modules/@ngtools/webpack/src/index.js): Error: D:_lieben\DevOps\Gtrack Web v3\GTrack.UI\Gtrack\src\app\models\companySearchCriteria.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. at AngularCompilerPlugin.getCompiledFile (D:_lieben\DevOps\Gtrack Web v3\GTrack.UI\Gtrack\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:933:23) at D:_lieben\DevOps\Gtrack Web v3\GTrack.UI\Gtrack\node_modules@ngtools\webpack\src\loader.js:41:31 at processTicksAndRejections (internal/process/task_queues.js:93:5)

Below, is my tsconfig.app.json file:

      "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "types": []
  },
  "files": [
    "main.ts",
    "polyfills.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ]
}

I am not quite sure why this is happening. Any help would be appreciated.

3
  • Have the same issue. All lazy-loaded modules return message mentioned by OP (warning in my case, not error, though). Commented May 22, 2020 at 8:24
  • did you come right? I managed to sort out my problem Commented May 22, 2020 at 9:15
  • Unfortunately not. I've just created my own thread to not clutter yours. -> stackoverflow.com/questions/61951542/… Commented May 22, 2020 at 9:19

2 Answers 2

4

In my case, for some reason, the file name in the import statements were capatilized.

For instance, let's say I had the following .ts file: companySearchModel.ts

export class CompanySearchModel {
    //some properties
}

The import statement in another file, where the companySearchModel is used, looked like this:

import { CompanySearchModel } from './models/CompanySearchModel.ts'

When it should have looked, like this:

import { CompanySearchModel } from './models/companySearchModel.ts'

Not sure why this happened, but after changing the file's name in the import statement to reflect the real name of the file (lower case), it worked.

Sign up to request clarification or add additional context in comments.

Comments

0

In my case i only close the compiler and started again.

The problem was resolved.

Hope it works

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.