0

I installed ng-particles and tsparticles. But when i run ng serve command,it give error like this.

⠋ 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)

My package.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"
  }
}

How can i solve this error. please help me someone..

hanushi
  • 119
  • 6
  • 14
  • Did you run `npm install` or `yarn` in the folder? The dependency is there and it should be inside `node_modules` – Caelan Jul 02 '21 at 23:43

1 Answers1

0

I had a similar problem, the error was:

Error: The target entry-point "@angular/fire" has missing dependencies:

  • rxjs
  • rxjs/operators
  • @angular/core

so follow these steps, it solved my problem:

npm i @angular/fire
npm i firebase
Mario Petrovic
  • 7,500
  • 14
  • 42
  • 62
shir
  • 1