Bugsounet Coding

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Solved Question about npm version

    Issues
    4
    5
    110
    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.
    • mlewus
      mlewus last edited by

      I installed my mirror with npm 8.3.0 and node v16.x. I understand Google Assistant has issues with npm 7.x and higher and should be installed with npm 6.14.15. Do I need to uninstall my existing MagicMirror, downgrade npm, and start from scratch? Or can I downgrade npm and just use it to build MMM-GoogleAssistant and MMM-Detector?
      Thanks!

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by bugsounet

        Hi @mlewus,

        Naturally you don’t have to uninstall MagicMirror and associed modules !

        Just install npm v6.14.15 and try this this commands:

        sudo npm install -g npm@6.14.15
        

        for GA (inside the module directory):

        npm run rebuild
        

        for Detector (inside the module directory too):

        npm run rebuild
        

        for MagicMirror (inside root directory of MagicMirror)

        npm install
        

        Infos

        in my knowledge, no MM modules need npm 7.x or 8.x
        Actually this npm 7 and 8 are so bugged with a rpi
        that why MM rules are npm 6.14.15 (the lastest of v6.x)

        why is bugged ?

        complex module need system dependencies and naturally some libraries
        you will say to me: “yes but it’s the npm install job”
        i’m agree with you in this point but npm install with npm v6 and npm v7/v8 are not the same !

        Natural rules for installer are (used by npm v6):

        1. install system dependencies if something is missing (with apt-get install)
        2. other prepare rules
        3. install any library needed (npm @bugsounet/xxxx for example)
        4. finalize installation

        this rules are used by npm v6.14.15 😉 perfect !

        What about install with npm v7/8 !?

        rules installer with this version is not the same

        1. install any library needed (npm @bugsounet/xxxx for example)
        2. install system dependencies if something is missing (with apt-get install)
        3. other prepare rules
        4. finalize installation

        Now it’s really a problem because some library have again his own install rules and if system dependencies if missed … the result: installer crash 😕
        Actually an issue is open for this problem… and me (and other coder) are waiting about solve

        1 Reply Last reply Reply Quote 0
        • T
          talha.ahmii last edited by

          Hello sir,
          Can i know how can i downgrade my npm version?
          I have installed magic mirror and npm version 8 is installed but mmm google assistant things are giving error in installation because of npm version 8 … how can i downgrade it to npm 6?

          kelly97129 1 Reply Last reply Reply Quote 0
          • kelly97129
            kelly97129 Donators @talha.ahmii last edited by kelly97129

            Hello,
            @talha-ahmii

            npm install -g npm@6.14.15
            

            in

            /home/pi/MagicMirror/modules/MMM-GoogleAssistant
            
            T 1 Reply Last reply Reply Quote 0
            • T
              talha.ahmii @kelly97129 last edited by

              @kelly97129 thank you mate

              1 Reply Last reply Reply Quote 0
              • Topic has been marked as solved  bugsounet bugsounet 
              • First post
                Last post
              Powered by NodeBB | @bugsounet ©2022