gpt4 book ai didi

angular - PrimeNG TableModule 错误

转载 作者:行者123 更新时间:2023-12-05 07:33:51 24 4
gpt4 key购买 nike

我正在尝试使用 TableModule 并遇到这些错误,我正在尝试按照 module page 中的安装说明进行操作

  1. 从“primeng/table”导入 {TableModule}; enter image description here

  2. 为表准备一些数据 enter image description here

  3. 使用表格` enter image description here

但我得到错误: enter image description here

我尝试运行此命令 npm install rxjs - 但它没有帮助..

我做错了什么?


package.json

{
"name": "prime",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/compiler-cli": "^6.0.0",
"@angular-devkit/build-angular": "~0.6.1",
"typescript": "~2.7.2",
"@angular/cli": "~6.0.1",
"@angular/language-service": "^6.0.0",
"@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": "~1.4.2",
"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"
}
}

最佳答案

听起来安装了正确的包,所以我建议您完成 npm 的故障排除步骤,the following特别是:

"Some strange issues can be resolved by simply running npm cache clean and trying again."

如果问题仍然存在并且假设您的依赖项在 package.json 中,我建议您尝试通过 deleting the node_modules directory and re-running npm install 进行更完整的刷新.

如果这不起作用,请发布您的 package.json 依赖项,以便我们有更清晰的工作思路。

关于angular - PrimeNG TableModule 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50394166/

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