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.

    Mirror Update Permissions Error

    Scheduled Pinned Locked Moved Troubleshooting
    18 Posts 3 Posters 3.7k Views 3 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.
    • X Offline
      xxLulaBelle
      last edited by

      Hi,

      My mirror is saying it needs an update but I get the following when I follow instructions to do so. Also, will the update take away all my modifications?

      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/graceful-fs
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/mkdirp
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/nopt
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/safe-buffer
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/spdx-license-ids
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules
      npm WARN checkPermissions Missing write access to /usr/lib/node_modules
      npm ERR! code EACCES
      npm ERR! syscall access
      npm ERR! path /usr/lib/node_modules/npm/node_modules/graceful-fs
      npm ERR! errno -13
      npm ERR! Error: EACCES: permission denied, access ‘/usr/lib/node_modules/npm/node_modules/graceful-fs’
      npm ERR! { [Error: EACCES: permission denied, access ‘/usr/lib/node_modules/npm/node_modules/graceful-fs’]
      npm ERR! stack:
      npm ERR! ‘Error: EACCES: permission denied, access '/usr/lib/node_modules/npm/node_modules/graceful-fs'’,
      npm ERR! errno: -13,
      npm ERR! code: ‘EACCES’,
      npm ERR! syscall: ‘access’,
      npm ERR! path: ‘/usr/lib/node_modules/npm/node_modules/graceful-fs’ }
      npm ERR!
      npm ERR! The operation was rejected by your operating system.
      npm ERR! It is likely you do not have the permissions to access this file as the current user
      npm ERR!
      npm ERR! If you believe this might be a permissions issue, please double-check the
      npm ERR! permissions of the file and its containing directories, or try running
      npm ERR! the command again as root/Administrator.

      npm ERR! A complete log of this run can be found in:
      npm ERR! /home/pi/.npm/_logs/2020-07-09T16_54_50_536Z-debug.log

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @xxLulaBelle
        last edited by sdetweil

        @xxLulaBelle do this

        cd ~/MagicMirror
        sudo chown -r pi node_modules
        

        then update again
        may have to do the same for the npm library catalog

        sudo chown -r pi ~/.npm

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        X 1 Reply Last reply Reply Quote 0
        • X Offline
          xxLulaBelle @sdetweil
          last edited by

          @sdetweil thank you will try this.

          1 Reply Last reply Reply Quote 0
          • X Offline
            xxLulaBelle
            last edited by

            I tried the above as suggested but get this error now:

            chown: invalid option – ‘r’
            Try ‘chown --help’ for more information.

            S 1 Reply Last reply Reply Quote 0
            • S Away
              sdetweil @xxLulaBelle
              last edited by

              @xxLulaBelle look at the help, does it need capital R, not near my computer

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • X Offline
                xxLulaBelle
                last edited by

                Apologies I don’t speak the language so I don’t understand it unfortunately but I did a capital R and got the following:

                chown: invalid option – ‘r’
                Try ‘chown --help’ for more information.

                S 1 Reply Last reply Reply Quote 0
                • S Away
                  sdetweil @xxLulaBelle
                  last edited by

                  @xxLulaBelle
                  like this notice the dash - in front of the r

                  sudo chown -R pi ~/.npm
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  X 1 Reply Last reply Reply Quote 0
                  • X Offline
                    xxLulaBelle @sdetweil
                    last edited by

                    Hi,

                    Now getting this when I try to update.

                    pi@raspberrypi:~/MagicMirror $ git pull && npm install
                    Updating 447c0bf…018cb91
                    error: Your local changes to the following files would be overwritten by merge:
                    package-lock.json
                    package.json
                    Please commit your changes or stash them before you merge.
                    Aborting

                    S 1 Reply Last reply Reply Quote 0
                    • S Away
                      sdetweil @xxLulaBelle
                      last edited by sdetweil

                      @xxLulaBelle we don’t care about the package-lock.json file

                      but the package.json maybe

                      do

                      git diff package.json
                      

                      to see what was changed.

                      my update script, from here, https://github.com/sdetweil/MagicMirror_scripts, might have helped.

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • X Offline
                        xxLulaBelle
                        last edited by

                        @sdetweil said in Mirror Update Permissions Error:

                        git diff package.json

                        pi@raspberrypi:~ $ git diff package.json
                        Not a git repository
                        To compare two paths outside a working tree:
                        usage: git diff [–no-index]

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          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