• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

bash: npm: command not found RPI 3B

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 1.2k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    d_n_i
    last edited by Dec 20, 2021, 1:45 AM

    I have looked through the forums for anyone else having asked this question so as to not create another but I couldn’t locate a previous post about my exact issue.

    I am trying to install using the manual instructions on the MagicMirror2 website but I am unable to complete them. When I get to step 4 (npm install) I get the following.

    pi@raspberrypi:~ $ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    sudo apt install -y nodejs
    E: dpkg was interrupted, you must manually run ‘sudo dpkg --configure -a’ to correct the problem.
    pi@raspberrypi:~ $ sudo dpkg --configure -a
    Processing triggers for hicolor-icon-theme (0.17-2) …
    Processing triggers for gnome-menus (3.36.0-1) …
    Processing triggers for man-db (2.9.4-2) …
    Processing triggers for mailcap (3.69) …
    Processing triggers for desktop-file-utils (0.26-1) …
    pi@raspberrypi:~ $ git clone https://github.com/MichMich/MagicMirror
    Cloning into ‘MagicMirror’…
    remote: Enumerating objects: 21940, done.
    remote: Counting objects: 100% (2/2), done.
    remote: Compressing objects: 100% (2/2), done.
    remote: Total 21940 (delta 0), reused 0 (delta 0), pack-reused 21938
    Receiving objects: 100% (21940/21940), 18.26 MiB | 1.15 MiB/s, done.
    Resolving deltas: 100% (13428/13428), done.
    pi@raspberrypi:~ $ cd MagicMirror/
    pi@raspberrypi:~/MagicMirror $ npm install
    bash: npm: command not found
    pi@raspberrypi:~/MagicMirror $

    I am using the latest full version of Raspberry Pi OS with Desktop and recommended software Kernel version 5.10 on Pi 3B.

    I have been playing with the rpi since 2015 on and off but I am for sure no expert user so any help would be great. Thank you in advance for your time and help!

    -L.G.

    S 1 Reply Last reply Dec 20, 2021, 2:36 AM Reply Quote 0
    • S Offline
      sdetweil @d_n_i
      last edited by sdetweil Dec 20, 2021, 3:26 AM Dec 20, 2021, 2:36 AM

      @d_n_i use my install script
      many platforms don’t have node & npm installed

      see
      https://github.com/sdetweil/MagicMirror_scripts

      have to delete the MagicMirror folder first.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      D 1 Reply Last reply Dec 20, 2021, 3:24 AM Reply Quote 0
      • D Offline
        d_n_i @sdetweil
        last edited by Dec 20, 2021, 3:24 AM

        @sdetweil thanks for the reply! Can you direct me any further on what specifically that looks like? I’m not quite sure I understand where on the link you gave to look.

        S 1 Reply Last reply Dec 20, 2021, 3:28 AM Reply Quote 0
        • S Offline
          sdetweil @d_n_i
          last edited by Dec 20, 2021, 3:28 AM

          @d_n_i read the page. if your native language is not English translate the page.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          D 1 Reply Last reply Dec 20, 2021, 3:38 AM Reply Quote 0
          • D Offline
            d_n_i @sdetweil
            last edited by Dec 20, 2021, 3:38 AM

            @sdetweil English is my native language and I do know how to use translate but thank you.

            I’ve tried what’s on the page you sent all day as well as the the one stated above but I still have not gotten anywhere unfortunately. I’ve tried on Pi3B and Pi4 and running the script you sent gives me the following,

            pi@raspberrypi:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)”

            $$\ $$\ $$\ $$\ $$\ $$\ $$$$$$
            $$$\ $$$ | _| $$$\ $$$ |_| $$ $$
            $$$$\ $$$$ | $$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$$$\ $$$$ |$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ _/ $$ |
            $$$$$$ $$ | _
            $$\ $$ $$\ $$ |$$ |$$$$$$ $$ |$$ |$$ $$\ $$ $$\ $$ $$\ $$ $$\ $$$$$$ |
            $$ $$$ $$ | $$$$$$$ |$$ / $$ |$$ |$$ / $$ $$$ $$ |$$ |$$ | _|$$ | _|$$ / $$ |$$ | _|$$ /
            $$ |$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ | $$ |$ /$$ |$$ |$$ | $$ | $$ | $$ |$$ | $$ |
            $$ | _/ $$ |$$$$$$$ |$$$$$$$ |$$ |$$$$$$$\ $$ | _/ $$ |$$ |$$ | $$ | $$$$$$ |$$ | $$$$$$$$
            _
            | _
            | _
            | _
            $$ |_| _
            |_| _|_|_| __| _
            / _| _______|
            $$\ $$ |
            $$$$$$ |
            _
            ____/

            install log being saved to /home/pi/install.log
            Installing helper tools …
            E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
            Updating packages …
            bash: line 141: pv: command not found
            Check current Node installation …
            Node currently installed. Checking version number.
            node: error while loading shared libraries: libnode.so.72: cannot open shared object file: No such file or directory
            Minimum Node version: v14.0.0
            Installed Node version: V1.0.0
            Node should be upgraded.
            Installing Node.js …
            Reading package lists… Done
            Building dependency tree… Done
            Reading state information… Done
            The following packages were automatically installed and are no longer required:
            gyp libc-ares2 libfuse2 libjs-highlight.js libjs-inherits libjs-is-typedarray libjs-psl
            libjs-typedarray-to-buffer libssl-dev libuv1-dev node-abbrev node-agent-base node-ajv node-ansi node-ansi-regex
            node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap node-asn1
            node-assert-plus node-asynckit node-aws-sign2 node-aws4 node-balanced-match node-bcrypt-pbkdf
            node-brace-expansion node-builtins node-cacache node-caseless node-chalk node-chownr node-clone
            node-color-convert node-color-name node-colors node-columnify node-combined-stream node-concat-map
            node-console-control-strings node-copy-concurrently node-core-util-is node-dashdash node-debug node-defaults
            node-delayed-stream node-delegates node-depd node-ecc-jsbn node-encoding node-err-code node-escape-string-regexp
            node-extend node-extsprintf node-fast-deep-equal node-forever-agent node-form-data node-fs-write-stream-atomic
            node-fs.realpath node-function-bind node-gauge node-getpass node-glob node-graceful-fs node-har-schema
            node-har-validator node-has-flag node-has-unicode node-hosted-git-info node-http-signature node-https-proxy-agent
            node-iconv-lite node-iferr node-imurmurhash node-indent-string node-inflight node-inherits node-ini node-ip
            node-ip-regex node-is-typedarray node-isarray node-isexe node-isstream node-jsbn node-json-parse-better-errors
            node-json-schema node-json-schema-traverse node-json-stable-stringify node-json-stringify-safe node-jsonify
            node-jsonparse node-jsonstream node-jsprim node-leven node-lockfile node-lru-cache node-mime node-mime-types
            node-minimatch node-mkdirp node-move-concurrently node-ms node-mute-stream node-nopt node-normalize-package-data
            node-npm-bundled node-npm-package-arg node-npmlog node-number-is-nan node-oauth-sign node-object-assign node-once
            node-opener node-osenv node-p-map node-path-is-absolute node-performance-now node-process-nextick-args
            node-promise-inflight node-promise-retry node-promzard node-psl node-puka node-punycode node-qs node-read
            node-read-package-json node-readable-stream node-request node-resolve node-resolve-from node-retry node-rimraf
            node-run-queue node-safe-buffer node-semver node-set-blocking node-signal-exit node-slash node-spdx-correct
            node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids node-sshpk node-ssri node-string-decoder
            node-string-width node-strip-ansi node-supports-color node-tar node-text-table node-through node-tough-cookie
            node-tunnel-agent node-tweetnacl node-typedarray-to-buffer node-unique-filename node-universalify node-uri-js
            node-util-deprecate node-uuid node-validate-npm-package-license node-validate-npm-package-name node-verror
            node-wcwidth.js node-which node-wide-align node-wrappy node-write-file-atomic node-yallist nodejs-doc
            python-is-python2
            Use ‘sudo apt autoremove’ to remove them.
            The following packages will be upgraded:
            nodejs
            1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
            Need to get 0 B/23.0 MB of archives.
            After this operation, 115 MB of additional disk space will be used.
            apt-listchanges: Reading changelogs…
            (Reading database … 168913 files and directories currently installed.)
            Preparing to unpack …/nodejs_14.18.2-deb-1nodesource1_armhf.deb …
            Unpacking nodejs (14.18.2-deb-1nodesource1) over (12.22.5~dfsg-2~11u1) …
            dpkg: error processing archive /var/cache/apt/archives/nodejs_14.18.2-deb-1nodesource1_armhf.deb (–unpack):
            trying to overwrite ‘/usr/share/doc/nodejs/api/fs.html’, which is also in package nodejs-doc 12.22.5~dfsg-2~11u1
            dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
            Errors were encountered while processing:
            /var/cache/apt/archives/nodejs_14.18.2-deb-1nodesource1_armhf.deb
            E: Sub-process /usr/bin/dpkg returned an error code (1)
            node version is node: error while loading shared libraries: libnode.so.72: cannot open shared object file: No such file or directory
            node: error while loading shared libraries: libnode.so.72: cannot open shared object file: No such file or directory
            Node.js installation Done! version=
            Check current NPM installation …
            npm is not installed.
            Installing npm …
            E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
            sudo: npm: command not found
            bash: line 275: npm: command not found
            npm installation Done! version=V
            Cloning MagicMirror …
            Cloning into ‘MagicMirror’…
            remote: Enumerating objects: 325, done.
            remote: Counting objects: 100% (325/325), done.
            remote: Compressing objects: 100% (290/290), done.
            remote: Total 325 (delta 52), reused 139 (delta 22), pack-reused 0
            Receiving objects: 100% (325/325), 478.06 KiB | 529.00 KiB/s, done.
            Resolving deltas: 100% (52/52), done.
            Cloning MagicMirror Done!
            touch: cannot touch ‘/etc/chromium-browser/customizations/01-disable-update-check’: No such file or directory
            tee: /etc/chromium-browser/customizations/01-disable-update-check: No such file or directory
            Installing dependencies …
            bash: line 340: npm: command not found
            Unable to install dependencies!
            pi@raspberrypi:~ $

            S 1 Reply Last reply Dec 20, 2021, 3:46 AM Reply Quote 0
            • S Offline
              sdetweil @d_n_i
              last edited by Dec 20, 2021, 3:46 AM

              @d_n_i ok, this is bullseye base if u downloaded since oct 30.

              so you need to use the one for bullseye

              and you will have to reflash the SD card, as the bad install messes up everything.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                5/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy