0

I've got a project that needs to use a third-party custom library that was given for the project. How does one correctly use/integrate it? Do you have to import it to "package.json" like any other dependency?

"dependencies": {
  "custom-lib": "^1.0.0",
  // other deps
}

When I try to do so, it kind of works but its assets do not load for example (404 (Not Found))...Does one need to add some references in "angular.json" too? Describe the proper way of configuring this, please. Any advice is appreciated.

Edit: Plus when running npm install, the library disappears from node_modules

Tanay
  • 871
  • 1
  • 6
  • 12
Artleks
  • 156
  • 2
  • 16
  • Where is the library located? In node_modules? Did you install via npm or it just a folder? – nll_ptr May 06 '22 at 20:12
  • @nullptr.t I moved it to the node_modules. It is just a custom library (a folder), not installable by npm. – Artleks May 06 '22 at 20:24
  • Then you can reference it like this: `"custom-lib": "file:node_modules/custom-lib"` (I'm assuming the folder is named "custom-lib" as well) https://stackoverflow.com/questions/14381898/local-dependency-in-package-json – nll_ptr May 06 '22 at 20:33

0 Answers0