Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.5K
Views
An unhandled exception occurred: Script file ../node_modules/chart.js does not exist

I'm trying to use PrimeNG on my Angular project,Iv created a new project and tried to start, but it give me this error, I did the following steps:

  1. npm install primeng --save
  2. npm install @angular/animations --save
  3. npm install Chart.js --save
  4. npm uninstall ng2-charts

I added ../node_modules/chart.js/dist/Chart.js in my Angular.json

When I try to run my project with ng serve, it gives me this following error :

An unhandled exception occurred: Script file ../node_modules/chart.js does not exist

Any help can be usefull, thanks.

Edit:

Here is a part of my Angular.json :

"architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist/YarbiTkhdem",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "aot": true,
            "assets": ["src/favicon.ico", "src/assets"],
            "styles": ["src/styles.css"],
            "scripts": ["../node_modules/chart.js/dist/Chart.js"]
          },
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You don't need the chartjs script in your angular json

"scripts": ["../node_modules/chart.js/dist/Chart.js"]

And you can add typing to charjs with :

npm install --save @types/chart.js

https://www.npmjs.com/package/@types/chart.js

over 4 years ago · Santiago Trujillo Report

0

An unhandled exception occurred: Script file node_modules/chart.js/dist/Chart.min.js does not exist.

Just install using npm install chart.js --save

The problem will be fixed

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!