gpt4 book ai didi

ngx-bootstrap - 角度 - 错误 TS2307 : Cannot find module 'ngx-bootstrap/modal'

转载 作者:行者123 更新时间:2023-12-04 00:03:48 27 4
gpt4 key购买 nike

我已安装 ngx-bootstrap使用命令 npm install ngx-bootstrap --save但是当我尝试构建解决方案时,它仍然说
ERROR in src/app/app.module.ts(37,45): error TS2307: Cannot find module 'ngx-bootstrap/modal' .

我已经检查了 node_modules 文件夹 ngx-bootstrap/modal存在于那里。

这是我的包裹

 {
"name": "test-app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.1.0",
"@angular/common": "^5.1.0",
"@angular/compiler": "^5.1.0",
"@angular/core": "^5.1.0",
"@angular/forms": "^5.1.0",
"@angular/http": "^5.1.0",
"@angular/platform-browser": "^5.1.0",
"@angular/platform-browser-dynamic": "^5.1.0",
"@angular/router": "^5.1.0",
"@ng-select/ng-select": "^1.6.3",
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "^2.0.1",
"angular2-jwt": "^0.2.3",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"intl": "^1.2.5",
"jquery": "^3.3.1",
"moment": "^2.22.2",
"ng2-select2": "^1.0.0-beta.16",
"ngx-bootstrap": "^3.1.2",
"ngx-drag-and-drop-lists": "1.1.3",
"ngx-logger": "^3.1.0",
"ngx-moment": "^3.1.0",
"ngx-mydatepicker": "^2.4.9",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "^1.5.6",
"@angular/compiler-cli": "^5.1.0",
"@angular/language-service": "^5.1.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage": "^1.1.2",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-junit-reporter": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.4",
"node-sass": "^4.9.0",
"phantomjs": "^2.1.7",
"protractor": "^5.3.2",
"ts-node": "~3.2.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}

任何人都可以请帮忙

最佳答案

尝试使用这个 npm install ngx-bootstrap@2.0.5 --save它可能会起作用!

关于ngx-bootstrap - 角度 - 错误 TS2307 : Cannot find module 'ngx-bootstrap/modal' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53441167/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com