在“我的Angular应用程序”中,我已经安装了“ angular-bootstrap-md”:“ ^ 6.3.0”,
GIT存储库:https://github.com/fareed543/Angular-6-App
当我运行应用程序时,它在控制台中出现错误提示。
ng服务
在终端中显示:
ERROR in ./node_modules/angular-bootstrap-md/fesm5/angular-bootstrap-md.js
Module build failed: Error: ENOENT: no such file or directory, open 'D:\project6\node_modules\angular-bootstrap-md\fesm5\angular-bootstrap-md.js'
在控制台中
./node_modules/angular-bootstrap-md/fesm5/angular-bootstrap-md.js
Module build failed: Error: ENOENT: no such file or directory, open 'D:\project6\node_modules\angular-bootstrap-md\fesm5\angular-bootstrap-md.js'
这是我的package.json文件。
"dependencies": {
"@angular/animations": "^6.0.3",
"@angular/cdk": "^6.2.0",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "^6.2.1",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"@swimlane/ngx-datatable": "^15.0.2",
"angular-bootstrap-md": "^6.3.0",
"core-js": "^2.5.4",
"jquery": "^3.4.1",
"ng-drag-drop": "^5.0.0",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.5.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/compiler-cli": "^6.0.3",
"@angular-devkit/build-angular": "~0.6.8",
"typescript": "~2.7.2",
"@angular/cli": "~6.0.8",
"@angular/language-service": "^6.0.3",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1"
}
答案 0 :(得分:1)
在库(HERE)的安装步骤中,他们还说您必须手动安装一些依赖项,例如chart.js
和hammerjs
。
要使您的项目正常工作,您需要运行以下命令:
npm install angular-bootstrap-md@^6.3.0 chart.js@^2.5.0 hammerjs@^2.0.8
答案 1 :(得分:0)
它与angular-bootstrap-md软件包有关,我用6.1.1降级了。
"angular-bootstrap-md": "^6.1.1",
工作正常。