abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.79k stars 3.41k forks source link

Cannot find module 'perfect-scrollbar' or its corresponding type declarations #16488

Closed gerryge closed 1 year ago

gerryge commented 1 year ago

Is there an existing issue for this?

Description

./node_modules/@volo/ngx-lepton-x.core/fesm2020/volo-ngx-lepton-x.core.mjs:11:0-49 - Error: Module not found: Error: Can't resolve 'perfect-scrollbar' in '...\angular\node_modules\@volo\ngx-lepton-x.core\fesm2020'

Error: node_modules/@volo/ngx-lepton-x.core/lib/abstracts/perfect-scrollbar.d.ts:3:30 - error TS2307: Cannot find module 'perfect-scrollbar' or its corresponding type declarations.

3 import PerfectScrollbar from 'perfect-scrollbar';


Error: node_modules/@volo/ngx-lepton-x.core/lib/models/common.d.ts:2:30 - error TS2307: Cannot find module 'perfect-scrollbar' or its corresponding type declarations.

2 import PerfectScrollbar from 'perfect-scrollbar';

Reproduction Steps

  1. abp new Acme.BookStore -u angular --separate-identity-server -csf
  2. cd angular folder
  3. yarn start

Expected behavior

Should success to compile.

Actual behavior

Failed to compile.

Regression?

Work in v7.1.1

Known Workarounds

No response

Version

7.2.1

User Interface

Angular

Database Provider

EF Core (Default)

Tiered or separate authentication server

Separate Auth Server

Operation System

Windows (Default)

Other information

package.json

{
  "name": "book-store",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --open",
    "build": "ng build",
    "build:prod": "ng build --configuration production",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "lint": "ng lint"
  },
  "private": true,
  "dependencies": {
    "@abp/ng.account": "~7.2.1",
    "@abp/ng.components": "~7.2.1",
    "@abp/ng.core": "~7.2.1",
    "@abp/ng.oauth": "~7.2.1",
    "@abp/ng.identity": "~7.2.1",
    "@abp/ng.setting-management": "~7.2.1",
    "@abp/ng.tenant-management": "~7.2.1",
    "@abp/ng.theme.shared": "~7.2.1",
    "@abp/ng.theme.lepton-x": "~2.2.0-rc.1",
    "@angular/animations": "^15.0.1",
    "@angular/common": "^15.0.1",
    "@angular/compiler": "^15.0.1",
    "@angular/core": "^15.0.1",
    "@angular/forms": "^15.0.1",
    "@angular/localize": "^15.0.1",
    "@angular/platform-browser": "^15.0.1",
    "@angular/platform-browser-dynamic": "^15.0.1",
    "@angular/router": "^15.0.1",
    "bootstrap-icons": "~1.8.3",
    "rxjs": "7.5.6",
    "tslib": "^2.1.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@abp/ng.schematics": "~7.2.1",
    "@angular-devkit/build-angular": "^15.0.1",
    "@angular-eslint/builder": "~15.1.0",
    "@angular-eslint/eslint-plugin": "~15.1.0",
    "@angular-eslint/eslint-plugin-template": "~15.1.0",
    "@angular-eslint/schematics": "~15.1.0",
    "@angular-eslint/template-parser": "~15.1.0",
    "@angular/cli": "^15.0.1",
    "@angular/compiler-cli": "^15.0.1",
    "@angular/language-service": "^15.0.1",
    "@types/jasmine": "~3.6.0",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "^5.36.2",
    "@typescript-eslint/parser": "^5.36.2",
    "eslint": "^8.23.0",
    "jasmine-core": "~4.0.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.1.0",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.7.0",
    "ng-packagr": "^15.0.1",
    "typescript": "~4.8.3"
  }
}
huynhdev24 commented 1 year ago

Me too

masum-ulu commented 1 year ago

Hi Gerry, I moved this issue to lepton theme repo it'll fixed at next version, I'm closing this issue For now you can add perfect-scrollbar directly with yarn add perfect-scrollbar or npm install perfect-scrollbar

swirzt commented 1 year ago

Currently having the same problem. Created a new project with the latest abp cli version (7.2.3) with the following command: abp new Project.Name -u angular -dbms PostgreSQL --pwa

Already tried adding the package with yarn add perfect-scrollbar and deleting the .angular folder, the problem persists.

If I remove the node_modules folder and install with npm, angular compiles but the webpage fails with a NG0203 error.