MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

Trying to Install, encountering error during NPM install



  • Hi All,

    I’ve tried installing MM with both the automated script and the manual way, and in both cases it fails at the same point.

    I’ve attached to this the log of npm install when trying to install manually, can anyone point me in the right direction for how to troubleshoot/fix this?

    Thanks!

    root@home:~/MagicMirror# npm install && DISPLAY=:0 nohup npm start
    npm WARN engine request@2.83.0: wanted: {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine grunt-jsonlint@1.1.0: wanted: {"node":">=4.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine http-auth@3.2.3: wanted: {"node":">=4.6.1"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine grunt-eslint@20.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine spectron@3.7.3: wanted: {"node":">=0.12.4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine chai@4.1.2: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine feedme@1.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine stylelint@8.4.0: wanted: {"node":">=4.2.1"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine mocha@4.1.0: wanted: {"node":">= 4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine eslint@4.18.2: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine chalk@2.3.2: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine eventyoshi@0.2.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine apache-md5@1.1.2: wanted: {"node":">=4.6.1"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine apache-crypt@1.2.1: wanted: {"node":">=4.6.1"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine supports-color@5.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine ansi-styles@3.2.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine has-flag@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine webdriverio@4.12.0: wanted: {"node":">= 4.8.5"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine uws@9.14.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine form-data@2.3.2: wanted: {"node":">= 0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine har-validator@5.0.3: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine deep-extend@0.4.2: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine electron-download@4.1.0: wanted: {"node":">= 4.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine har-schema@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
    npm WARN engine env-paths@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine sumchecker@2.0.2: wanted: {"node":">= 4.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine path-exists@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine hosted-git-info@2.6.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine deep-extend@0.4.2: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine hoek@4.2.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine boom@4.3.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine sntp@2.1.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine cryptiles@3.1.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine esprima@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine hosted-git-info@2.6.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine boom@5.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine hosted-git-info@2.6.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    |
    > electron@1.4.15 postinstall /root/MagicMirror/node_modules/electron
    > node install.js
    
    /
    /root/MagicMirror/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
    const Hoek = require('hoek');
    ^^^^^
    SyntaxError: Use of const in strict mode.
        at Module._compile (module.js:439:25)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object. (/root/MagicMirror/node_modules/request/node_modules/hawk/lib/index.js:5:33)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
    npm WARN This failure might be due to the use of legacy binary "node"
    npm WARN For further explanations, please read
    /usr/share/doc/nodejs/README.Debian
    
    npm WARN engine type-detect@4.0.8: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine deep-eql@3.0.1: wanted: {"node":">=0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm ERR! electron@1.4.15 postinstall: `node install.js`
    npm ERR! Exit status 8
    npm ERR!
    npm ERR! Failed at the electron@1.4.15 postinstall script.
    npm ERR! This is most likely a problem with the electron package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node install.js
    npm ERR! You can get their info via:
    npm ERR!     npm owner ls electron
    npm ERR! There is likely additional logging output above.
    
    npm ERR! System Linux 4.9.35-v7+
    npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
    npm ERR! cwd /root/MagicMirror
    npm ERR! node -v v0.10.29
    npm ERR! npm -v 1.4.21
    npm ERR! code ELIFECYCLE
    npm WARN engine growl@1.10.3: wanted: {"node":">=4.x"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine supports-color@4.4.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    |
    > electron-chromedriver@1.7.1 install /root/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver
    > node ./download-chromedriver.js
    
    -
    /root/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver/node_modules/electron-download/lib/index.js:3
    const debug = require('debug')('electron-download')
    ^^^^^
    SyntaxError: Use of const in strict mode.
        at Module._compile (module.js:439:25)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object. (/root/MagicMirror/node_modules/spectron/node_modules/electron-chromedriver/download-chromedriver.js:3:24)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
    npm WARN This failure might be due to the use of legacy binary "node"
    npm WARN For further explanations, please read
    /usr/share/doc/nodejs/README.Debian
    
    npm ERR! Error: ENOENT, lstat '/root/MagicMirror/node_modules/spectron/node_modules/webdriverio/build/lib/protocol/pullFile.js'
    npm ERR! If you need help, you may report this *entire* log,
    npm ERR! including the npm and node versions, at:
    npm ERR!     
    
    npm ERR! System Linux 4.9.35-v7+
    npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
    npm ERR! cwd /root/MagicMirror
    npm ERR! node -v v0.10.29
    npm ERR! npm -v 1.4.21
    npm ERR! path /root/MagicMirror/node_modules/spectron/node_modules/webdriverio/build/lib/protocol/pullFile.js
    npm ERR! fstream_path /root/MagicMirror/node_modules/spectron/node_modules/webdriverio/build/lib/protocol/pullFile.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
    npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine globby@7.1.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine postcss@6.0.19: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine postcss-less@1.1.3: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine postcss-reporter@5.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine log-symbols@2.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine postcss-selector-parser@3.1.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine resolve-from@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine string-width@2.1.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine table@4.0.3: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine chalk@2.3.2: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine meow@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine get-stdin@5.0.1: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine html-tags@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine pify@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine cosmiconfig@3.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine strip-ansi@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine camelcase-keys@4.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine read-pkg-up@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine minimist-options@3.0.2: wanted: {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine redent@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine trim-newlines@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine dir-glob@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine ansi-styles@3.2.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine supports-color@5.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine ansi-regex@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine indent-string@3.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine strip-indent@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine parse-json@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine camelcase@4.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine quick-lru@1.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine map-obj@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine find-up@2.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine read-pkg@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine path-type@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine has-flag@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine hosted-git-info@2.6.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine path-type@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine load-json-file@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine locate-path@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine strip-bom@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine parse-json@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine p-locate@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine path-exists@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine slice-ansi@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine dot-prop@4.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine p-limit@1.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine postcss@5.2.18: wanted: {"node":">=0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine p-try@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine esprima@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine strip-ansi@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine pluralize@7.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine eslint-visitor-keys@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine eslint-scope@3.7.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine globals@11.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine ansi-regex@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine esrecurse@4.2.1: wanted: {"node":">=4.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine supports-color@5.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine ansi-escapes@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine cli-cursor@2.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine figures@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine string-width@2.1.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine external-editor@2.1.0: wanted: {"node":">=0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine run-async@2.3.0: wanted: {"node":">=0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine has-flag@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine slice-ansi@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine string-width@2.1.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine restore-cursor@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine onetime@2.0.1: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine mimic-fn@1.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine esprima@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
    npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
    
    > uws@9.14.0 install /root/MagicMirror/node_modules/socket.io/node_modules/engine.io/node_modules/uws
    > node-gyp rebuild > build_log.txt 2>&1 || exit 0
    
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR!     /root/MagicMirror/npm-debug.log
    npm ERR! not ok code 0
    

  • Moderator

    You are running very old versions of npm and node. I am on my smartphone and cannot run a search on the forum for you, but you should be able to find similar posts with resolution



  • Thanks! I did apt-get install npm, so I assumed it would install the latest version. I can update node though, thanks!



  • So trying to update NodeJS has shown something else I saw during the automated script:

    W: Failed to fetch http://repo.mysql.com/apt/debian/dists/wheezy/InRelease Unable to find expected entry ‘mysql-apt-config/binary-armhf/Packages’ in Release file (Wrong sources.list entry or malformed file)

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    Error executing command, exiting

    Seems like this is an issue on the other end, as opposed to on mine?



  • @antnorwe Follow my post HERE to update nodejs and requirements.

    In addition you should really consider updating your distro to Raspbian Stretch, and

    1. Don’t install MM as root
    2. Don’t install outside /home/pi