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

499
Views
Embeding js library in angular project raise: Module not found: Error: Can't resolve

I have following problem: im working on Angular project where i need to implement a flowchart editor for witch im using this library: https://github.com/jerosoler/Drawflow

together with types definition: https://www.npmjs.com/package/@types/drawflow

All works fine as long as both are imported from npm. But i actually need to change a couple things in the drawflow library and i was trying to add the scripts directly into my project. But as soon as i remove npm package for drawflow im getting following exception: ./src/app/pages/tree-editor-page/components/editor-presentation/editor-presentation.component.ts:1:0-56 - Error: Module not found: Error: Can't resolve 'src/app/drawflow/@types/drawflow' in 'C:\DEV\repos\Digilize\DMS\DMS-Frontend\src\app\pages\tree-editor-page\components\editor-presentation'

Files included in project:

enter image description here

scripts defined in angular.json:

"styles": [
              "src/app/styles/styles.scss",
              "src/app/drawflow/js/dist/drawflow.min.css"
            ],
            "scripts": ["src/app/drawflow/js/dist/drawflow.min.js"]

Component with types import:

import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';

import Drawflow from 'src/app/drawflow/@types/drawflow';
import { combineLatest, first, last } from 'rxjs';
import { DTNode, DTRelation } from 'src/app/interfaces/api/decision-tree-definition.interface';
import { DTStoreService } from 'src/app/services/store/dt-state.store';

@Component({
  selector: 'app-editor-presentation',
  templateUrl: './editor-presentation.component.html',
  styleUrls: ['./editor-presentation.component.scss']
})
export class EditorPresentationComponent implements OnInit, AfterViewInit {

  private editor: Drawflow;
...

Im quite new to Angular and i dont know what im doing wrong here. Any ideas?

about 4 years ago · Juan Pablo Isaza
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!