error: cannot find module 'pacote'

  • vorab...frohes neues jahr allen. so viel zeit muss sein.


    nach einiger zeit der abstinenz bin ich (hoffenlicht wieder öfter) auch mal wieder hier und habe gleich ein sonderbares problem.


    homebridge läuft (seit langer zeit ) wunderbar. daher hab ich bislang auch keine notwendigkeit gesehen, etwas zu ändern.


    soeben will ich (da ich ja wieder mehr zeit habe) das


    sudo npm install -g homebridge-delayed-switches


    plugin installieren und bekomme die meldung: "cannot find module pacote" !?


    nichts, nicht mal nach update abfragen, geht mehr, da immer genau diese meldung kommt.

    da ich nichtmals wusste, ein modul "pacote" zu haben ( :) ) bin ich recht sicher, ein solches auch nicht wissentlich gelöscht oder deinstalliert zu haben.


    lt. NPM ist pacote eine node.js library, welches man zum installieren von plugin´s benötigt, wenn ich das richtig verstanden habe. also hab ich es mit


    npm install --save pacote


    einfach installieren wollen, aber ...nix. wie vorher, nicht mal das abfragen von:


    pi@raspberrypi:~ $ npm list -g --depth=0

    npm ERR! code MODULE_NOT_FOUND

    npm ERR! Cannot find module 'pacote'

    npm ERR! A complete log of this run can be found in:

    npm ERR! /home/pi/.npm/_logs/2018-01-04T17_21_29_506Z-debug.log

    geht ohne das die "pacote" meldung kommt.


    obige log:


    0 info it worked if it ends with ok

    1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'outdated', '-g' ]

    2 info using [email protected]

    3 info using [email protected]

    4 verbose stack Error: Cannot find module 'pacote'

    4 verbose stack at Function.Module._resolveFilename (module.js:489:15)

    4 verbose stack at Function.Module._load (module.js:439:25)

    4 verbose stack at Module.require (module.js:517:17)

    4 verbose stack at require (internal/module.js:11:18)

    4 verbose stack at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:14:16)

    4 verbose stack at Module._compile (module.js:573:30)

    4 verbose stack at Object.Module._extensions..js (module.js:584:10)

    4 verbose stack at Module.load (module.js:507:32)

    4 verbose stack at tryModuleLoad (module.js:470:12)

    4 verbose stack at Function.Module._load (module.js:462:3)

    4 verbose stack at Module.require (module.js:517:17)

    4 verbose stack at require (internal/module.js:11:18)

    4 verbose stack at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/install/deps.js:15:28)

    4 verbose stack at Module._compile (module.js:573:30)

    4 verbose stack at Object.Module._extensions..js (module.js:584:10)

    4 verbose stack at Module.load (module.js:507:32)

    5 verbose cwd /home/pi

    6 verbose Linux 4.9.35-v7+

    7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "outdated" "-g"

    8 verbose node v8.4.0

    9 verbose npm v5.5.1

    10 error code MODULE_NOT_FOUND

    11 error Cannot find module 'pacote'

    12 verbose exit [ 1, true ]


    hilft mir jetzt auch nicht wirklich weiter.


    ach so...reboot...und HB läuft -wie immer- sauber hoch und macht mit allen schaltern, regeln, was sie soll *grübel* ich kann nur nicht´s neues (plugin) installieren.


    hat jemand einen hinweis, tipp, einen rat für mich. danke euch.

  • Vielleicht solltest du pacote installieren.

  • Frohes neues ;)


    Würde npm mal de und wieder neu installieren vielleicht hilft das ja.

  • Keine Ahnung. Ich hätte es aus dem Bauch heraus mit

    Code
    sudo npm install -g pacote

    oder

    Code
    sudo npm install -g --unsafe-perm pacote

    versucht. Aber die Anleitung auf https://github.com/zkat/pacote sagt ja das, was du schon versucht hast.


    Kann nicht helfen.

  • sschuste


      Nastra



    sagte ja, bei allem kommt die meldung.


    von daher auch beim installieren wollen von "pacote" selber


    sudo npm install -g --unsafe-perm pacote

    npm ERR! code MODULE_NOT_FOUND

    npm ERR! Cannot find module 'pacote'


    oder beim uninstall von npm


    pi@raspberrypi:~ $ sudo npm uninstall npm -g

    npm ERR! code MODULE_NOT_FOUND

    npm ERR! Cannot find module 'pacote'

    ? *grübel* ?

  • Vielleicht hilft ein Update von npm?


    npm install npm@latest -g


    npm --version

    5.6.0