Когда я запускаю команду: ng serve -o
у меня появляется эта ошибка:
ОШИБКА в src / app / views / base / navbars / navbars.component.ts: 2: 33 - ошибка TS2307: не удается найти модуль 'ngx- bootstrap'. Строка 2: импорт {CollapseDirective} из 'ngx- bootstrap';
это мой пакет. json файл:
{
..............
"dependencies": {
"@angular/animations": "^9.0.0",
"@angular/common": "^9.0.0",
"@angular/compiler": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/forms": "^9.0.0",
"@angular/platform-browser": "^9.0.0",
"@angular/platform-browser-dynamic": "^9.0.0",
"@angular/router": "^9.0.0",
"@coreui/angular": "^2.9.0",
"@coreui/coreui": "^2.1.16",
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1",
"@coreui/icons": "0.3.0",
"angular-datatables": "^9.0.1",
"bootstrap": "^4.3.1",
"chart.js": "^2.9.2",
"core-js": "^2.6.11",
"datatables.net": "^1.10.20",
"datatables.net-dt": "^1.10.20",
"flag-icon-css": "^3.4.6",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"moment": "^2.24.0",
"mutationobserver-shim": "^0.3.3",
"ng2-charts": "^2.3.0",
"ngx-bootstrap": "^5.2.0",
"ngx-perfect-scrollbar": "^8.0.0",
"rxjs": "^6.5.3",
"simple-line-icons": "^2.4.1",
"ts-helpers": "^1.1.2",
"tslib": "^1.10.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.1",
"@angular/cli": "^9.0.1",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "^9.0.0",
"@types/jasmine": "^3.5.3",
"@types/jasminewd2": "^2.0.8",
"@types/jquery": "^3.3.34",
"@types/node": "^12.11.1",
"codelyzer": "^5.2.1",
"jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.5.2",
"protractor": "^5.4.2",
"ts-node": "^8.4.1",
"tslint": "^5.20.0",
"typescript": "~3.7.5"
},
"engines": {
"node": ">= 10",
"npm": ">= 6"
}
}
фактически, модуль работает правильно в другом компьютер. но когда я использовал git для работы дома, я не смог выполнить проект.