Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngtypecheck.d.ts not found #633

Closed
daniel-sc opened this issue Jul 25, 2024 · 4 comments · Fixed by #634
Closed

ngtypecheck.d.ts not found #633

daniel-sc opened this issue Jul 25, 2024 · 4 comments · Fixed by #634

Comments

@daniel-sc
Copy link

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/ngx-scrollbar

Steps to reproduce:

  1. use v15.1.1
  2. run ng serve

Expected Behavior

Build should succeed.

Actual Behavior

I get the following error:

ng serve -c int

Application bundle generation failed. [30.824 seconds]

X [ERROR] TS6053: File 'C:/devsbb/projekte/cargo-hub-ui/node_modules/ngx-scrollbar/smooth-scroll/public_api.ngtypecheck.d.ts' not found. [plugin angular-compiler]

    node_modules/ngx-scrollbar/smooth-scroll/public_api.d.ts:1:21:
      1 │ /// <reference path="public_api.ngtypecheck.d.ts" />
        ╵                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS6053: File 'C:/devsbb/projekte/cargo-hub-ui/node_modules/ngx-scrollbar/smooth-scroll/smooth-scroll-manager.ngtypecheck.d.ts' not found. [plugin angular-compiler]

    node_modules/ngx-scrollbar/smooth-scroll/smooth-scroll-manager.d.ts:1:21:
      1 │ /// <reference path="smooth-scroll-manager.ngtypecheck.d.ts" />
        ╵                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS6053: File 'C:/devsbb/projekte/cargo-hub-ui/node_modules/ngx-scrollbar/smooth-scroll/smooth-scroll.ngtypecheck.d.ts' not found. [plugin angular-compiler]

    node_modules/ngx-scrollbar/smooth-scroll/smooth-scroll.d.ts:1:21:
      1 │ /// <reference path="smooth-scroll.ngtypecheck.d.ts" />
        ╵                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS6053: File 'C:/devsbb/projekte/cargo-hub-ui/node_modules/ngx-scrollbar/smooth-scroll/smooth-scroll.model.ngtypecheck.d.ts' not found. [plugin angular-compiler]

    node_modules/ngx-scrollbar/smooth-scroll/smooth-scroll.model.d.ts:1:21:
      1 │ /// <reference path="smooth-scroll.model.ngtypecheck.d.ts" />
        ╵                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Environment

  • Angular: 18.1.1
  • ngx-scrollbar: 15.1.1
  • Browser(s): n/a
  • Operating System (e.g. Windows, macOS, Ubuntu): win10
  • tsconfig.app.json
{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "strictNullChecks": true,
    "strictBindCallApply": true,
    "strictFunctionTypes": true,
    "types": [
      "ineum",
      "@angular/localize"
    ]
  },
  "angularCompilerOptions": {
    "strictTemplates": true,
    "extendedDiagnostics": {
      "checks": {
        "optionalChainNotNullable": "suppress"
      }
    }
  },
  "files": [
    "main.ts"
  ],
  "include": [
    "src/**/*.d.ts"
  ]
}
  • tsconfig.json:
{
  "compileOnSave": true,
  "compilerOptions": {
    "baseUrl": "./",
    "downlevelIteration": true,
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "es2020",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "importHelpers": true,
    "strictNullChecks": false,
    "target": "ES2022",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2020",
      "dom"
    ],
    "useDefineForClassFields": false
  },
  "include": [
    "src/**/*"
  ]
}
@daniel-sc
Copy link
Author

Note: I had a similar issue at some other lib. There I could resolve it by using typescript 5.5 - see angular/angular#56945

@cesaric
Copy link

cesaric commented Jul 25, 2024

Confirming the same error on 15.1.1:

/angular/node_modules/ngx-scrollbar/smooth-scroll/public_api.ngtypecheck.d.ts' not found. [plugin angular-compiler]

@MurhafSousli
Copy link
Owner

Note: I had a similar issue at some other lib. There I could resolve it by using typescript 5.5 - see angular/angular#56945

It seems that packages built with ng-packagr 18.1.0 requires TS 5.5. What do we do at this point?

@daniel-sc
Copy link
Author

@MurhafSousli I think upgrading this project to TS 5.5 should be the best solution. As it is only a devDependency this should not impact downstream projects.

@MurhafSousli MurhafSousli linked a pull request Jul 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants