错误:目标入口点"ng-particles"缺少依赖项:- ts粒子



我安装了ng粒子和ts粒子。但当我运行ng serve命令时,它会给出这样的错误。

⠋ Generating browser application bundles (phase: setup).../home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/targeted_entry_point_finder.js:40
throw new Error("The target entry-point "" + invalidTarget.entryPoint.name + "" has missing dependencies:n" +
^
Error: The target entry-point "ng-particles" has missing dependencies:
- tsparticles
at TargetedEntryPointFinder.findEntryPoints (/home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/targeted_entry_point_finder.js:40:23)
at /home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/execution/analyze_entry_points.js:29:41
at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (/home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:28:29)
at /home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:59
at SyncLocker.lock (/home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/locking/sync_locker.js:34:24)
at SingleProcessExecutorSync.execute (/home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:27)
at Object.mainNgcc (/home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/src/main.js:74:25)
at Object.process (/home/tsparticles/demo/angular/node_modules/@angular/compiler-cli/ngcc/index.js:29:23)
at NgccProcessor.processModule (/home/tsparticles/demo/angular/node_modules/@ngtools/webpack/src/ngcc_processor.js:175:16)
at /home/tsparticles/demo/angular/node_modules/@ngtools/webpack/src/ivy/host.js:146:18
at /home/tsparticles/demo/angular/node_modules/@ngtools/webpack/src/ivy/host.js:76:24
at Array.map (<anonymous>)
at Object.host.resolveModuleNames (/home/tsparticles/demo/angular/node_modules/@ngtools/webpack/src/ivy/host.js:74:32)
at actualResolveModuleNamesWorker (/home/tsparticles/demo/angular/node_modules/typescript/lib/typescript.js:109497:133)
at resolveModuleNamesWorker (/home/tsparticles/demo/angular/node_modules/typescript/lib/typescript.js:109760:26)
at resolveModuleNamesReusingOldState (/home/tsparticles/demo/angular/node_modules/typescript/lib/typescript.js:109857:24)

我的包.json

{
"name": "ng-particles-demo",
"version": "1.15.2",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/matteobruni/tsparticles.git"
},
"bugs": {
"url": "https://github.com/matteobruni/tsparticles/issues"
},
"dependencies": {
"@angular/animations": "~12.1.0",
"@angular/common": "~12.1.0",
"@angular/compiler": "~12.1.0",
"@angular/core": "~12.1.0",
"@angular/forms": "~12.1.0",
"@angular/platform-browser": "~12.1.0",
"@angular/platform-browser-dynamic": "~12.1.0",
"@angular/router": "~12.1.0",
"ng-particles": "^2.13.2",
"rxjs": "~7.1.0",
"tslib": "^2.3.0",
"tsparticles": "^1.30.2",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.1.0",
"@angular/cli": "~12.1.0",
"@angular/compiler-cli": "~12.1.0",
"@types/node": "^15.12.5",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"codelyzer": "^6.0.2",
"eslint": "^7.29.0",
"eslint-config-prettier": "^8.3.0",
"prettier": "^2.3.2",
"protractor": "~7.0.0",
"ts-node": "~10.0.0",
"tslint": "~6.1.3",
"typescript": "~4.3.4"
}
}

我该如何解决这个错误。请帮帮我。。

我也遇到过类似的问题,错误是:

错误:目标入口点"角/火";缺少相关性:

  • rxjs
  • rxjs/运算符
  • @角/芯

所以按照这些步骤,它解决了我的问题:

npm i @angular/fire
npm i firebase

最新更新