Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Entwicklung
    4. npm prune löscht Module im javascript-Adapter

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    npm prune löscht Module im javascript-Adapter

    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas Braun
      Thomas Braun Most Active last edited by Thomas Braun

      Moinsen,

      mit der Bitte um Gegenprüfung:

      Im javascript-Adapter zusätzlich eingetragene Module verschwinden in meinem System regelmäßig nach einem

      npm prune
      

      Jetzt könnte man sagen, dann prune halt nicht. Das Problem ist nur, dass npm die Eigenheit hat in regelmäßigen Abständen automatisch zu prunen:

      In normal operation, extraneous modules are pruned automatically, so you'll only need this command with the --production flag. However, in the real world, operation is not always "normal".

      https://docs.npmjs.com/cli/v9/commands/npm-prune?v=true

      echad@chet:/opt/iobroker $ npm ls playactor
      iobroker.inst@3.0.0 /opt/iobroker
      └─┬ iobroker.javascript@6.1.4
        └── playactor@0.4.1
      
      echad@chet:/opt/iobroker $ npm ls
      iobroker.inst@3.0.0 /opt/iobroker
      ├── @types/caseless@0.12.2 extraneous
      ├── @types/request@2.48.8 extraneous
      ├── @types/tough-cookie@4.0.2 extraneous
      ├── coffeescript@1.12.7 extraneous
      ├── iobroker.admin@6.3.6
      ├── iobroker.alexa2@3.23.2
      ├── iobroker.alias-manager@1.2.6
      ├── iobroker.backitup@2.5.12
      ├── iobroker.ble@0.13.3
      ├── iobroker.cloud@4.3.1
      ├── iobroker.echarts@1.3.4
      ├── iobroker.firetv@1.0.0 (git+ssh://git@github.com/iobroker-community-adapters/ioBroker.firetv.git#9b51df4e1e37f0d3b9d599d2724210d64aa81629)
      ├── iobroker.followthesun@0.4.1
      ├── iobroker.govee-app@0.0.3 (git+ssh://git@github.com/TA2k/ioBroker.govee-app.git#f7848a9817a15db547dd5fc7f332822752d9bed6)
      ├── iobroker.govee@0.0.6 (git+ssh://git@github.com/nbuenger/ioBroker.govee.git#73ec80b6350890015d95428dd3bbd3f72417a073)
      ├── iobroker.history@2.2.4
      ├── iobroker.ical@1.13.2
      ├── iobroker.iceroad@1.1.3
      ├── iobroker.info@1.9.26
      ├── iobroker.iot@1.14.3
      ├── iobroker.javascript@6.1.4
      ├── iobroker.js-controller@4.0.24
      ├── iobroker.midea@0.1.0 (git+ssh://git@github.com/TA2k/ioBroker.midea.git#0d037c0c9a025b193546f881f747c8f998bfc724)
      ├── iobroker.mihome-cloud@0.0.5
      ├── iobroker.mihome-vacuum@3.9.5
      ├── iobroker.mihome@1.4.0
      ├── iobroker.miio@0.0.13
      ├── iobroker.nina@0.0.25
      ├── iobroker.nuki-extended@2.6.5
      ├── iobroker.parcel@0.0.25
      ├── iobroker.rpi2@1.3.2
      ├── iobroker.sainlogic@0.10.0
      ├── iobroker.samsung@0.5.11 (git+ssh://git@github.com/iobroker-community-adapters/ioBroker.samsung.git#59d70226dd038dec8e64eb6636c7604d3a6c8bba)
      ├── iobroker.simple-api@2.7.2
      ├── iobroker.socketio@6.3.3
      ├── iobroker.switchbot-ble@0.4.6 (git+ssh://git@github.com/mrbungle64/ioBroker.switchbot-ble.git#bb366661fd47a9730359a6ba61ed85a4aea8153a)
      ├── iobroker.switchbot-hub@0.1.2 (git+ssh://git@github.com/DrozmotiX/ioBroker.switchbot-hub.git#de8c1ad97edafedb16cbbb2c6dc14b032848df8e)
      ├── iobroker.tado@0.4.4
      ├── iobroker.tankerkoenig@3.3.7
      ├── iobroker.tr-064@4.2.18
      ├── iobroker.tradfri@3.1.3
      ├── iobroker.trashschedule@2.2.0
      ├── iobroker.tuya@3.14.1
      ├── iobroker.web@5.4.3
      ├── iobroker.whatsapp-cmb@0.2.3
      ├── iobroker.ws@2.3.5
      ├── iobroker.zigbee@1.8.10
      ├── jsonata@1.8.6 extraneous
      ├── node-inspect@2.0.0 extraneous
      ├── picocolors@1.0.0 extraneous
      ├── suncalc2@1.8.1 extraneous
      ├── typescript@4.7.4 extraneous
      ├── virtual-tsc@0.6.2 extraneous
      └── wake_on_lan@1.0.0 extraneous
      
      echad@chet:/opt/iobroker $ npm prune
      
      removed 159 packages, and changed 1 package in 9s
      
      96 packages are looking for funding
        run `npm fund` for details
      
      echad@chet:/opt/iobroker $ npm ls playactor
      iobroker.inst@3.0.0 /opt/iobroker
      └── (empty)
      
      echad@chet:/opt/iobroker $
      

      Das ganze mit

      echad@chet:/opt/iobroker $ npm -v
      9.4.0
      

      Müssen die zusätzlichen Module irgendwie anders im npm tree verankert werden? Mich wundert es etwas, weil prune eigentlich nur als 'extraneous' gekennzeichnete Module rauswerfen sollte, in obigem Beispiel ist playactor aber nicht als überflüssig gekennzeichnet.

      Feuersturm Quarkmax 2 Replies Last reply Reply Quote 0
      • Feuersturm
        Feuersturm @Thomas Braun last edited by

        @thomas-braun
        Hab einmal deine Schritte bei mir nachgestellt.
        Folgende NPM Module sind bei mir bei der Javascript Instanz hinzugefügt:
        19b27316-ef46-431c-9425-04661013876d-grafik.png

        proxmox@ioBrokerTestsystem:/opt/iobroker$ npm -v
        9.3.1
        
        proxmox@ioBrokerTestsystem:/opt/iobroker$ npm ls xml2js
        iobroker.inst@2.0.3 /opt/iobroker
        +-- iobroker.fritzbox@0.5.0
        | +-- tr-064@0.2.0
        | | `-- xml2js@0.4.23 deduped
        | `-- xml2js@0.4.23
        +-- iobroker.hm-rega@3.0.43
        | `-- xml2js@0.4.23 deduped
        +-- iobroker.javascript@6.1.4
        | `-- xml2js@0.4.23 deduped
        +-- iobroker.sayit@1.12.6
        | `-- aws-sdk@2.1071.0
        |   `-- xml2js@0.4.19
        +-- iobroker.tr-064@4.2.18
        | +-- tr-O64@0.2.4
        | | `-- xml2js@0.4.23 deduped
        | `-- xml2js@0.4.23 deduped
        `-- iobroker.web-speedy@0.2.0
          `-- speedtest-net@1.6.2
            `-- xml2js@0.4.23 deduped
        
        
        proxmox@ioBrokerTestsystem:/opt/iobroker$ npm ls
        iobroker.inst@2.0.3 /opt/iobroker
        +-- colors@1.4.0
        +-- fs-extra@7.0.1
        +-- iobroker.admin@6.3.6
        +-- iobroker.backitup@2.5.12
        +-- iobroker.benchmark@1.1.4
        +-- iobroker.daswetter@3.1.7
        +-- iobroker.device-watcher@2.6.0
        +-- iobroker.devices@1.1.2
        +-- iobroker.dwd@2.8.3
        +-- iobroker.fritzbox@0.5.0
        +-- iobroker.fully-tablet-control@0.3.4-0 (git+ssh://git@github.com/xXBJXx/ioBroker.fully-tablet-control.git#7117121d4e659a2ddf69feb2698a4014588a5f94)
        +-- iobroker.hm-rega@3.0.43
        +-- iobroker.hm-rpc@1.15.16
        +-- iobroker.hue@3.7.1
        +-- iobroker.ical@1.13.2
        +-- iobroker.icons-material-png@0.1.0
        +-- iobroker.icons-mfd-svg@1.1.0
        +-- iobroker.icons-ultimate-png@1.0.1
        +-- iobroker.influxdb@3.2.0
        +-- iobroker.info@1.9.26
        +-- iobroker.javascript@6.1.4
        +-- iobroker.js-controller@4.0.24
        +-- iobroker.mqtt@4.0.7
        +-- iobroker.nina@0.0.25
        +-- iobroker.proxmox@1.3.5
        +-- iobroker.rainbird@0.2.3 (git+ssh://git@github.com/StrathCole/ioBroker.rainbird.git#0caa24dcbb11024865ff9161c6f6bb5e6db6a9ce)
        +-- iobroker.samsung-community@0.5.0 (git+ssh://git@github.com/iobroker-community-adapters/ioBroker.samsung-community.git#dd5c173cf9056c3ab9bd45006f17bb639d9ff5f8)
        +-- iobroker.sayit@1.12.6
        +-- iobroker.scenes@2.3.9
        +-- iobroker.simple-api@2.7.2
        +-- iobroker.smartmeter@3.3.4
        +-- iobroker.socketio@6.3.3
        +-- iobroker.spotify-premium@1.2.2 (git+ssh://git@github.com/iobroker-community-adapters/ioBroker.spotify-premium.git#e2c9d945f0ee4e68ef36f618bd24de4aaf80e9d0)
        +-- iobroker.sql@2.2.0
        +-- iobroker.tankerkoenig@3.3.7
        +-- iobroker.telegram@1.15.2
        +-- iobroker.tr-064@4.2.18
        +-- iobroker.trashschedule@2.2.0
        +-- iobroker.unifi@0.6.3
        +-- iobroker.valloxmv@1.2.0 (git+ssh://git@github.com/hacki11/ioBroker.valloxmv.git#643ad6c55bbed7fbe878508159440c90d07e61fb)
        +-- iobroker.vis-2-beta@2.0.17
        +-- iobroker.vis-2-widgets-energy@0.1.3
        +-- iobroker.vis-2-widgets-gauges@0.1.4
        +-- iobroker.vis-2-widgets-material@0.2.1
        +-- iobroker.vis-fancyswitch@1.1.0
        +-- iobroker.vis-google-fonts@1.0.4
        +-- iobroker.vis-history@1.0.0
        +-- iobroker.vis-jqui-mfd@1.0.12
        +-- iobroker.vis-justgage@1.0.2
        +-- iobroker.vis-map@1.0.4
        +-- iobroker.vis-materialdesign@0.5.9
        +-- iobroker.vis-metro@1.2.0
        +-- iobroker.vis-timeandweather@1.2.2
        +-- iobroker.vis@1.4.16
        +-- iobroker.web-speedy@0.2.0
        +-- iobroker.web@5.4.3
        +-- iobroker.worx@2.0.3
        +-- iobroker.ws@2.3.5
        +-- iobroker@2.0.3
        +-- node-ssdp@4.0.1
        +-- semver@5.7.1
        `-- yargs@7.1.0
        
        
        proxmox@ioBrokerTestsystem:/opt/iobroker$ npm prune
        
        up to date in 12s
        
        73 packages are looking for funding
          run `npm fund` for details
        
        proxmox@ioBrokerTestsystem:/opt/iobroker$ npm ls xml2js
        iobroker.inst@2.0.3 /opt/iobroker
        +-- iobroker.fritzbox@0.5.0
        | +-- tr-064@0.2.0
        | | `-- xml2js@0.4.23 deduped
        | `-- xml2js@0.4.23
        +-- iobroker.hm-rega@3.0.43
        | `-- xml2js@0.4.23 deduped
        +-- iobroker.sayit@1.12.6
        | `-- aws-sdk@2.1071.0
        |   `-- xml2js@0.4.19
        +-- iobroker.tr-064@4.2.18
        | +-- tr-O64@0.2.4
        | | `-- xml2js@0.4.23 deduped
        | `-- xml2js@0.4.23 deduped
        `-- iobroker.web-speedy@0.2.0
          `-- speedtest-net@1.6.2
            `-- xml2js@0.4.23 deduped
        
        
        1 Reply Last reply Reply Quote 0
        • Quarkmax
          Quarkmax @Thomas Braun last edited by

          @thomas-braun
          Das haben wir hier schon mal angesprochen
          https://github.com/ioBroker/ioBroker.javascript/issues/1146

          MarkSau created this issue in ioBroker/ioBroker.javascript

          open /opt/iobroker/node_modules/iobroker.javascript/node_modules/ ist leer #1146

          Thomas Braun 1 Reply Last reply Reply Quote 0
          • Thomas Braun
            Thomas Braun Most Active last edited by

            @feuersturm

            Bei dir ist das Modul unterhalb des javascript-Adapters jetzt ja auch verschwunden.

            @Quarkmax
            Danke, muss ich mich mal durch fuxen.

            Feuersturm 1 Reply Last reply Reply Quote 0
            • Feuersturm
              Feuersturm @Thomas Braun last edited by

              @thomas-braun sagte in npm prune löscht Module im javascript-Adapter:

              Bei dir ist das Modul unterhalb des javascript-Adapters jetzt ja auch verschwunden.

              Richtig. Ich hab dann einen Neustart von der Javascript Instanz durchgeführt und dabei wurde es dann wieder installiert.

              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @Feuersturm last edited by Thomas Braun

                @feuersturm sagte in npm prune löscht Module im javascript-Adapter:

                Ich hab dann einen Neustart von der Javascript Instanz durchgeführt und dabei wurde es dann wieder installiert.

                Ja, das ist das Verhalten was ich hier auch beobachte. Ist nur doof, wenn du Dinge installierst und die Zusatzmodule dann erstmal rausfliegen.
                Ich will ja nicht bei jeder Aktion via npm anschließend den javascript-Adaper oder den ganzen ioBroker neustarten.

                1 Reply Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @Quarkmax last edited by Thomas Braun

                  @quarkmax

                  Ich hab jetzt mal wie im Issue die

                  rm /opt/iobroker/node_modules/.package-lock.json
                  rm /opt/iobroker/node_modules/iobroker.javascript/node_modules/.package-lock.json
                  rm /opt/iobroker/package-lock.json
                  

                  gelöscht und ein iob rebuild angeschoben.
                  So auf den ersten Blick war es das, das Zusatzmodul überlebt jetzt ein npm prune.

                  echad@chet:/opt/iobroker $ npm ls playactor
                  iobroker.inst@3.0.0 /opt/iobroker
                  └─┬ iobroker.javascript@6.1.4
                    └── playactor@0.4.1
                  
                  echad@chet:/opt/iobroker $ npm prune
                  npm WARN skipping integrity check for git dependency ssh://git@github.com/DrozmotiX/ioBroker.switchbot-hub.git
                  npm WARN skipping integrity check for git dependency ssh://git@github.com/nbuenger/ioBroker.govee.git
                  npm WARN deprecated appium-logger@2.1.0: Moved into appium-support
                  npm WARN deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
                  npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
                  
                  removed 785 packages, and changed 31 packages in 1m
                  
                  99 packages are looking for funding
                    run `npm fund` for details
                  echad@chet:/opt/iobroker $ npm ls playactor
                  iobroker.inst@3.0.0 /opt/iobroker
                  └─┬ iobroker.javascript@6.1.4
                    └── playactor@0.4.1
                  

                  €dit:
                  Hat nicht ganz funktioniert, ich habe dann noch alle anderen package-locks in /opt/iobroker rausgeworfen.
                  Nach

                  find "/opt/iobroker/" -iname "*package-lock*" -exec rm -rf "{}" \;
                  

                  ist Ruhe, scheint mir.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  780
                  Online

                  31.8k
                  Users

                  80.0k
                  Topics

                  1.3m
                  Posts

                  3
                  7
                  345
                  Loading More Posts
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes
                  Reply
                  • Reply as topic
                  Log in to reply
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                  The ioBroker Community 2014-2023
                  logo