Angular 6 material 控制台警告
Angular 6 material warning in console
在我的 Angular 应用程序中我安装了 "angular-bootstrap-md": "^6.3.0",
GIT 存储库:https://github.com/fareed543/Angular-6-App
当我 运行 应用程序在控制台中给出错误。
服务
在终端中显示:
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"
}
在库的安装步骤中(HERE)他们还说你必须手动安装一些依赖项,例如chart.js
和hammerjs
。
要使您的项目正常运行,您需要运行执行以下命令:
npm install angular-bootstrap-md@^6.3.0 chart.js@^2.5.0 hammerjs@^2.0.8
包 angular-bootstrap-md 有问题,我用 6.1.1 降级了它。
"angular-bootstrap-md": "^6.1.1",
它工作正常。
在我的 Angular 应用程序中我安装了 "angular-bootstrap-md": "^6.3.0",
GIT 存储库:https://github.com/fareed543/Angular-6-App
当我 运行 应用程序在控制台中给出错误。
服务
在终端中显示:
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"
}
在库的安装步骤中(HERE)他们还说你必须手动安装一些依赖项,例如chart.js
和hammerjs
。
要使您的项目正常运行,您需要运行执行以下命令:
npm install angular-bootstrap-md@^6.3.0 chart.js@^2.5.0 hammerjs@^2.0.8
包 angular-bootstrap-md 有问题,我用 6.1.1 降级了它。
"angular-bootstrap-md": "^6.1.1",
它工作正常。