Read the statement by Michael Teeuw here.
Mirror Update Permissions Error
-
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 -
@xxLulaBelle do this
cd ~/MagicMirror sudo chown -r pi node_modulesthen update again
may have to do the same for the npm library catalogsudo chown -r pi ~/.npm
-
@sdetweil thank you will try this.
-
I tried the above as suggested but get this error now:
chown: invalid option – ‘r’
Try ‘chown --help’ for more information. -
@xxLulaBelle look at the help, does it need capital R, not near my computer
-
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. -
@xxLulaBelle
like this notice the dash - in front of the rsudo chown -R pi ~/.npm -
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 -
@xxLulaBelle we don’t care about the package-lock.json file
but the package.json maybe
do
git diff package.jsonto see what was changed.
my update script, from here, https://github.com/sdetweil/MagicMirror_scripts, might have helped.
-
@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] -
Sorry realised I hadn’t opened Mirror…
diff --git a/package.json b/package.json
index 317969e…10a0407 100644
— a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
“chai”: “^4.1.2”,
“chai-as-promised”: “^7.1.1”,
“current-week-number”: “^1.0.7”,- “danger”: “^3.1.3”,
- “danger”: “^10.2.0”,
“grunt”: “latest”,
“grunt-eslint”: “latest”,
“grunt-jsonlint”: “latest”,
@@ -48,7 +48,7 @@
“grunt-yamllint”: “latest”,
“http-auth”: “^3.2.3”,
“jsdom”: “^11.6.2”,
- “mocha”: “^7.0.0”,
- “mocha”: “^8.0.1”,
“mocha-each”: “^1.1.0”,
“mocha-logger”: “^1.0.6”,
“spectron”: “^8.0.0”,
-
@xxLulaBelle what version r u on?
grep version package.json
-
I have no idea Sam. Honestly complete newb, don’t know what I’m donig half the time :man_facepalming_light_skin_tone:
-
@xxLulaBelle usually when I have this issue i run the following the the MagicMirror folder:
git reset --hard
then
git pull && npm install
That works for me and I am able to update -
@xxLulaBelle from the mm folder do
grep version package.json -
@mumblebaj that works, but. he made a change. let’s not lose this if it’s important.
use my script anyhow. solves lots of other problems with modules too
-
@sdetweil I agree, your scripts works wonders.
-
Ok thanks all, will try :) Sorry for being clueless :man_facepalming_light_skin_tone:
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login