🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 8 Min Lesezeit
0

How to Create an NPM Packages using Rollup.js + Lerna.js + Jfrog Artifactory

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

📃In this article we will figure it out, how to create your own npm package using the following technologies:




  • is a popular tool for managing JavaScript projects with multiple packages, often referred to as monorepos. It simplifies the process of versioning, publishing, and managing dependencies across various packages within a single repository.


  • . But the free open source is a cut down version that doesn't have any pre-built settings for the npm repository. Let's do it step by step!




    1. Let's create a new virtual npm repository. It's necessary to install our npm package from external access (public repository).

      The JFrog virtual npm repository is a consolidated view of multiple npm repositories, allowing users to access and manage npm packages from various sources in a single location. It acts as a proxy for local and remote npm repositories, enabling seamless integration of public and private packages. This setup simplifies dependency management, enhances performance through caching, and provides a unified interface for package retrieval. Additionally, virtual repositories support security and access control, ensuring that only authorized users can access specific packages.





      or



      ). As for the usage of these libraries, we can look at the official documentation:







      ❗But I'd like to show you the details of the settings ⚙.






      Rollup settings



      After







CODE
  "peerDependencies": {
"react": "^18.x",
"react-dom": "^18.x"
}






These peer dependencies ensures the package ui can be installed with the 18.x major version of the package react and react-dom only and these React libraries must be installed from your project (e.g. i installed them in my client project ) and limits react and react-dom versions to only major version 18.x




Also you can see other we can see lerna.json:




CODE
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"packages": ["packages/*"],
"npmClient": "yarn"
// "command": {
// "publish": {
// "registry": "https://some-art.com/artifactory/api/npm/portfolio-yues-it-npm/"
// }
// }
}






I added npmClientand command for testing lerna publish via yarn, but it didn't work for me and i published via yarn workspaces foreach no-private (we will it below ⬇).

An example of a project structure looks like this (❗Please note that in the settings you need to specify the prefix of the name of our root project):

to git via terminal (this is necessary for local publishing from a git repository) and test the connection for github: ssh -T ' we take from artifactory
Set up repo-click button
Configure and generate token

  • in addition, if you have a problem with public to JFROG Artifactory (when the yarn uses the Glogal settings), because the yarn doesn't use the local project settings from file .yarnrc.yml ->
    ❗you can see









    How to use npm packages



    After setting jfrog and npm project (lerna + rollup) we can install this package.

    But before we must:




    • write virtual url registry of our artifactory in .yarnrc.yml



    CODE
    enableStrictSsl: false

    httpTimeout: 600000

    nodeLinker: node-modules

    npmRegistryServer: 'https://some-art.com/artifactory/api/npm/portfolio-yues-it-npm/'

    yarnPath: .yarn/releases/yarn-4.5.1.cjs







    • than install package via:


      • yarn add @portfolio-yues-it-npm/ui

      • yarn add @portfolio-yues-it-npm/utils

      • yarn add @portfolio-yues-it-npm/icons





    If you want to test your npm package without publishing, just provide that path (file:../portfolio-yues-it-npm/packages/ui) in dependencies and run yarn install




    CODE
      "dependencies": {
    "@portfolio-yues-it-npm/ui": "file:../portfolio-yues-it-npm/packages/ui",
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
    },






    My examples:







    Thanks for reading and feedback!🙂

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
  • Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 0%
    🟡 In Evaluierung 0%
    🟢 Keine Auswirkung 0%
    Spannende Innovation 0%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    1 Quelle
    Hackers Just Poisoned the Rust Supply Chain | Threat Wire
    1 Quelle
    Hackers Found a Way Into Humanoid Robots | Threat Wire
    1 Quelle
    Bits und so #1021 (Passwort für Laufwerk)
    Ähnliche Beiträge
    🔍 Verwandte News

    Auch interessante Nachrichten How to Create an NPM Packages using Rollup.js + Lerna.js + Jfrog Artifactory

    Thematisch verwandte Begriffe: Create, Packages, using, Rollupjs · 6 Treffer

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...

    Laden...

    Beiträge werden geladen ...

    Laden...

    Videos werden geladen ...