• 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.

Installing on a Pi Zero

Scheduled Pinned Locked Moved Troubleshooting
175 Posts 33 Posters 180.5k Views 33 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.
  • N Offline
    nigel-daniels
    last edited by Apr 12, 2020, 9:02 PM

    I just attempted to install 2.11.0 on a Pi0 W, I got the following error running npm install:

    npm install
    npm ERR! Cannot read property 'resolve' of undefined
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/pi/.npm/_logs/2020-04-12T20_08_37_082Z-debug.log
    

    The log contains:

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
    2 info using npm@6.14.4
    3 info using node@v10.20.0
    4 verbose npm-session ed148b8dcfcaa591
    5 silly install runPreinstallTopLevelLifecycles
    6 silly preinstall magicmirror@2.11.0
    7 info lifecycle magicmirror@2.11.0~preinstall: magicmirror@2.11.0
    8 silly install loadCurrentTree
    9 silly install readLocalPackageData
    10 timing stage:loadCurrentTree Completed in 897ms
    11 silly install loadIdealTree
    12 silly install cloneCurrentTreeToIdealTree
    13 timing stage:loadIdealTree:cloneCurrentTree Completed in 10ms
    14 silly install loadShrinkwrap
    15 timing stage:loadIdealTree:loadShrinkwrap Completed in 42390ms
    16 silly install loadAllDepsIntoIdealTree
    17 silly fetchPackageMetaData error for grunt@latest Cannot read property 'resol
    ve' of undefined
    18 silly fetchPackageMetaData error for grunt-eslint@latest Cannot read property
     'resolve' of undefined
    19 silly fetchPackageMetaData error for grunt-jsonlint@latest Cannot read property 'resolve' of undefined
    20 silly fetchPackageMetaData error for grunt-markdownlint@latest Cannot read property 'resolve' of undefined
    21 silly fetchPackageMetaData error for grunt-stylelint@latest Cannot read property 'resolve' of undefined
    22 silly fetchPackageMetaData error for grunt-yamllint@latest Cannot read property 'resolve' of undefined
    23 silly fetchPackageMetaData error for stylelint@latest Cannot read property 'resolve' of undefined
    24 silly fetchPackageMetaData error for stylelint-config-standard@latest Cannot read property 'resolve' of undefined
    25 silly fetchPackageMetaData error for time-grunt@latest Cannot read property 'resolve' of undefined
    26 silly fetchPackageMetaData error for feedme@latest Cannot read property 'resolve' of undefined
    27 silly fetchPackageMetaData error for iconv-lite@latest Cannot read property 'resolve' of undefined
    28 silly fetchPackageMetaData error for moment@latest Cannot read property 'resolve' of undefined
    29 silly fetchPackageMetaData error for valid-url@latest Cannot read property 'resolve' of undefined
    30 silly fetchPackageMetaData error for feedme@latest Cannot read property 'resolve' of undefined
    31 silly fetchPackageMetaData error for iconv-lite@latest Cannot read property 'resolve' of undefined
    32 silly fetchPackageMetaData error for moment@latest Cannot read property 'resolve' of undefined
    33 silly fetchPackageMetaData error for valid-url@latest Cannot read property 'resolve' of undefined
    34 timing stage:rollbackFailedOptional Completed in 6ms
    35 timing stage:runTopLevelLifecycles Completed in 47409ms
    36 silly saveTree magicmirror@2.11.0
    36 silly saveTree ├─┬ chai-as-promised@7.1.1
    36 silly saveTree │ └── check-error@1.0.2
    
    ...
    
    36 silly saveTree     │ └── querystring@0.2.0
    36 silly saveTree     ├── wdio-dot-reporter@0.0.10
    36 silly saveTree     └── wgxpath@1.0.0
    37 verbose stack TypeError: Cannot read property 'resolve' of undefined
    37 verbose stack     at regFetch (/usr/local/lib/node_modules/npm/node_modules/n
    pm-registry-fetch/index.js:88:23)
    37 verbose stack     at fetchPackument (/usr/local/lib/node_modules/npm/node_mod
    ules/pacote/lib/fetchers/registry/packument.js:42:10)
    37 verbose stack     at packument (/usr/local/lib/node_modules/npm/node_modules/
    pacote/lib/fetchers/registry/packument.js:20:10)
    37 verbose stack     at getManifest (/usr/local/lib/node_modules/npm/node_module
    s/pacote/lib/fetchers/registry/manifest.js:22:10)
    37 verbose stack     at manifest (/usr/local/lib/node_modules/npm/node_modules/p
    acote/lib/fetchers/registry/manifest.js:13:10)
    37 verbose stack     at Object.manifest (/usr/local/lib/node_modules/npm/node_mo
    dules/pacote/lib/fetchers/registry/index.js:17:12)
    37 verbose stack     at Object.Fetcher#manifest [as manifest] (/usr/local/lib/no
    de_modules/npm/node_modules/genfun/lib/genfun.js:15:38)
    37 verbose stack     at manifest (/usr/local/lib/node_modules/npm/node_modules/p
    acote/lib/fetch.js:23:18)
    37 verbose stack     at pinflight (/usr/local/lib/node_modules/npm/node_modules/pacote/manifest.js:24:12)
    37 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/promiseinflight/inflight.js:29:24
    37 verbose stack     at Promise._execute (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/debuggability.js:313:9)
    37 verbose stack     at Promise._resolveFromExecutor (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:488:18)
    37 verbose stack     at new Promise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:79:10)
    37 verbose stack     at _inflight (/usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:28:25)
    37 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:22:14
    37 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
    38 verbose cwd /home/pi/MagicMirror
    39 verbose Linux 4.9.35+
    40 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
    41 verbose node v10.20.0
    42 verbose npm  v6.14.4
    43 error Cannot read property 'resolve' of undefined
    44 verbose exit [ 1, true ]
    

    Any idea where resolve should be set and what is missing?

    S 1 Reply Last reply Apr 12, 2020, 9:38 PM Reply Quote 0
    • S Offline
      sdetweil @nigel-daniels
      last edited by Apr 12, 2020, 9:38 PM

      @nigel-daniels i do not know… please use the scripted install from here

      https://github.com/sdetweil/MagicMirror_scripts

      look at the instructions

      also, rename MagicMirror folder out of the way… or erase it… install thinks it is doing for the 1st time.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      N 1 Reply Last reply Apr 12, 2020, 11:33 PM Reply Quote 0
      • N Offline
        nigel-daniels @sdetweil
        last edited by nigel-daniels Apr 12, 2020, 11:33 PM Apr 12, 2020, 11:33 PM

        @sdetweil hi, I have everything else set up and don’t really want to change thing, I had configured the PiZero some time ago. I was just reinstalling MM2. I decided I had left it so long since the last up date I just backed up my modules + config and have performed a reinstall. As far as I can tell the script is attempting a full config of the pi0?

        S 1 Reply Last reply Apr 12, 2020, 11:33 PM Reply Quote 0
        • S Offline
          sdetweil @nigel-daniels
          last edited by Apr 12, 2020, 11:33 PM

          @nigel-daniels no, just mm

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          N 1 Reply Last reply Apr 13, 2020, 3:22 PM Reply Quote 0
          • N Offline
            nigel-daniels @sdetweil
            last edited by Apr 13, 2020, 3:22 PM

            @sdetweil looks like the script gets to the same place :(

            Installing dependencies ...
            npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron@^6.1.7 (node_modules/electron):
            npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Cannot read property 'resolve' of undefined
            
            npm ERR! Cannot read property 'resolve' of undefined
            
            npm ERR! A complete log of this run can be found in:
            npm ERR!     /home/pi/.npm/_logs/2020-04-13T15_17_35_327Z-debug.log
            Unable to install dependencies! 
            

            The config.json only mentions electron in the optional dependancies so I don’t know where the resolve comes from. It looks to the the property of some var that is not being set.

            S 1 Reply Last reply Apr 13, 2020, 4:02 PM Reply Quote 0
            • S Offline
              sdetweil @nigel-daniels
              last edited by sdetweil Apr 13, 2020, 4:03 PM Apr 13, 2020, 4:02 PM

              @nigel-daniels ok. We need to upgrade node or npm

              Try
              sudo npm I -g npm
              Then npm install --only=prod
              In the MagicMirror folder

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              N 1 Reply Last reply Apr 13, 2020, 6:07 PM Reply Quote 0
              • N Offline
                nigel-daniels @sdetweil
                last edited by Apr 13, 2020, 6:07 PM

                @sdetweil thanks for the support, that fixed it!

                It looks like npm was broken. I removed node and npm then installed node v10.20.1 and things seem to be working again. Running npm install --only=prod let the install run without getting upset about electron!

                1 Reply Last reply Reply Quote 0
                • R Offline
                  RushHour99
                  last edited by Apr 15, 2020, 10:39 PM

                  @sdetweil

                  I ran your raspberry.sh install script on a Raspberry Pi Zero W yesterday. I started with a fresh install of Rasbian. The script completed with some warnings, but the Magic Mirror started and seems to be running OK. What does this error mean? Should I try to fix it even though MagicMirror seems to be running OK?

                  The errored log file was located at /home/pi/.npm/_logs/2020-04-14T22_35_02_257Z-debug.log

                  Here is the snippet from the end:

                  10077 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
                  10078 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                  10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
                  10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
                  10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
                  10079 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: arm
                  10080 verbose stack Error: electron-chromedriver@6.0.0 install: `node ./download-chromedriver.js`
                  10080 verbose stack Exit status 1
                  10080 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
                  10080 verbose stack     at EventEmitter.emit (events.js:189:13)
                  10080 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
                  10080 verbose stack     at ChildProcess.emit (events.js:189:13)
                  10080 verbose stack     at maybeClose (internal/child_process.js:970:16)
                  10080 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
                  10081 verbose pkgid electron-chromedriver@6.0.0
                  10082 verbose cwd /home/pi/MagicMirror
                  10083 verbose Linux 4.19.97+
                  10084 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install" "eslint"
                  10085 verbose node v10.15.2
                  10086 verbose npm  v6.14.4
                  10087 error code ELIFECYCLE
                  10088 error errno 1
                  10089 error electron-chromedriver@6.0.0 install: `node ./download-chromedriver.js`
                  10089 error Exit status 1
                  10090 error Failed at the electron-chromedriver@6.0.0 install script.
                  10090 error This is probably not a problem with npm. There is likely additional logging output above.
                  10091 verbose exit [ 1, true ]
                  

                  install.log:

                  install starting  - Tue Apr 14 17:54:46 EDT 2020
                  installing on armv6l processor system
                  the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
                  Updating packages ...
                  Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists...
                  apt-get update  completed ok
                  apt-get upgrade  started
                  apt upgrade result =rc=0 Reading package lists...
                  Building dependency tree...
                  Reading state information...
                  Calculating upgrade...
                  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                  Installing helper tools ...
                  Reading package lists...
                  Building dependency tree...
                  Reading state information...
                  build-essential is already the newest version (12.6).
                  curl is already the newest version (7.64.0-4+deb10u1).
                  git is already the newest version (1:2.20.1-2+deb10u1).
                  unzip is already the newest version (6.0-23+deb10u1).
                  wget is already the newest version (1.20.1-1.1).
                  wget set to manually installed.
                  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                  Check current Node installation ...
                  Node currently installed. Checking version number.
                  Minimum Node version: v10.1.0
                  Installed Node version: v10.15.2
                  No Node.js upgrade necessary.
                  Check current NPM installation ...
                  NPM currently installed. Checking version number.
                  Minimum npm version: V6.0.0
                  Installed npm version: V5.8.0
                  npm should be upgraded.
                  Installing npm ...
                  Reading package lists...
                  Building dependency tree...
                  Reading state information...
                  npm is already the newest version (5.8.0+ds6-4).
                  npm set to manually installed.
                  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                  upgrading npm to latest
                  /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
                  /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
                  + npm@6.14.4
                  added 435 packages from 869 contributors in 416.088s
                  npm installation Done! version=V6.14.4
                  Cloning MagicMirror ...
                  Cloning MagicMirror Done!
                  package.json update for armv6l completed ok
                  Installing dependencies ...
                  
                  > electron-chromedriver@6.0.0 install /home/pi/MagicMirror/node_modules/electron-chromedriver
                  > node ./download-chromedriver.js
                  
                  Dependencies installation Done!
                  setting up initial config.js
                  Check plymouth installation ...
                  Splashscreen: Checking themes directory.
                  Splashscreen: Create theme directory if not exists.
                  Splashscreen: Changed theme to MagicMirror successfully.
                  install and setup pm2
                  pm2 not installed, installing
                  pm2 install result npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) /usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2 /usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev /usr/local/bin/pm2-docker -> /usr/local/lib/node_modules/pm2/bin/pm2-docker /usr/local/bin/pm2-runtime -> /usr/local/lib/node_modules/pm2/bin/pm2-runtime npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/pm2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) + pm2@4.2.3 added 206 packages from 202 contributors in 240.179s
                  get the pm2 platform specific startup command
                  startup command = sudo env PATH=$PATH:/usr/bin:/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
                  
                                          -------------
                  
                  __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
                   _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
                    _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
                     _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
                      _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
                       _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
                        _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
                         _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
                          _\///______________\///______________\///__\///////////////__
                  
                  
                                            Runtime Edition
                  
                          PM2 is a Production Process Manager for Node.js applications
                                       with a built-in Load Balancer.
                  
                                  Start and Daemonize any application:
                                  $ pm2 start app.js
                  
                                  Load Balance 4 instances of api.js:
                                  $ pm2 start api.js -i 4
                  
                                  Monitor in production:
                                  $ pm2 monitor
                  
                                  Make pm2 auto-boot at server restart:
                                  $ pm2 startup
                  
                                  To go further checkout:
                                  http://pm2.io/
                  
                  
                                          -------------
                  
                  [PM2] Init System found: systemd
                  Platform systemd
                  Template
                  [Unit]
                  Description=PM2 process manager
                  Documentation=https://pm2.keymetrics.io/
                  After=network.target
                  
                  [Service]
                  Type=forking
                  User=pi
                  LimitNOFILE=infinity
                  LimitNPROC=infinity
                  LimitCORE=infinity
                  Environment=PATH=$PATH:/usr/bin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
                  Environment=PM2_HOME=/home/pi/.pm2
                  PIDFile=/home/pi/.pm2/pm2.pid
                  Restart=on-failure
                  
                  ExecStart=/usr/local/lib/node_modules/pm2/bin/pm2 resurrect
                  ExecReload=/usr/local/lib/node_modules/pm2/bin/pm2 reload all
                  ExecStop=/usr/local/lib/node_modules/pm2/bin/pm2 kill
                  
                  [Install]
                  WantedBy=multi-user.target
                  
                  Target path
                  /etc/systemd/system/pm2-pi.service
                  Command list
                  [ 'systemctl enable pm2-pi' ]
                  [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
                  [PM2] Making script booting at startup...
                  [PM2] [-] Executing: systemctl enable pm2-pi...
                  [PM2] [v] Command successfully executed.
                  +---------------------------------------+
                  [PM2] Freeze a process list on reboot via:
                  $ pm2 save
                  
                  [PM2] Remove init script via:
                  $ pm2 unstartup systemd
                  pm2 startup command done
                  configure the pm2 config file for MagicMirror
                  start MagicMirror via pm2 now
                  save MagicMirror pm2 config now
                  disable screensaver via gsettings was true and uint32 300
                  disable screensaver via lightdm.conf
                  disable screensaver via lxsession
                  We're ready! Run pm2 start MagicMirror from the ~/MagicMirror directory to start your MagicMirror.
                  install completed - Tue Apr 14 19:02:54 EDT 2020
                  
                  S 1 Reply Last reply Apr 15, 2020, 11:28 PM Reply Quote 0
                  • S Offline
                    sdetweil @RushHour99
                    last edited by Apr 15, 2020, 11:28 PM

                    @RushHour99 that error is because some of the components used for the automated testing aren’t found. It’s ok.

                    I need to recheck. I thought I had disabled trying to load those parts.

                    All looks good

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R S 2 Replies Last reply Apr 15, 2020, 11:59 PM Reply Quote 0
                    • R Offline
                      RushHour99 @sdetweil
                      last edited by Apr 15, 2020, 11:59 PM

                      @sdetweil Thanks for the reply. Magic Mirror does appear to be working just fine on my Pi Zero W. I only ran the install script. Should I run the upgrade script too?

                      S 1 Reply Last reply Apr 16, 2020, 12:24 AM Reply Quote 0
                      • 1
                      • 2
                      • 6
                      • 7
                      • 8
                      • 9
                      • 10
                      • 17
                      • 18
                      • 8 / 18
                      8 / 18
                      • First post
                        76/175
                        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