Node-red npm WARN checkPermissions

#1

hello, when I try to install some package on node-red with npm I get the following error :

sudo npm i node-red-node-base64
npm WARN checkPermissions Missing write access to /root/.node-red/node_modules/node-red-node-sqlite
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

npm ERR! path /root/.node-red/node_modules/node-red-node-sqlite
npm ERR! code ELOOP
npm ERR! errno -40
npm ERR! syscall access
npm ERR! ELOOP: too many symbolic links encountered, access '/root/.node-red/node_modules/node-red-node-sqlite'

I'm desperate, I do not know what to do, can someone help me? Any tips, way ..
npm -v
6.4.1

0 Likes

#2

Which instructions told you to use sudo ?
Should not be needed for installing extra nodes.

If you really do need to use sudo then you also need. --unsafe-perm

0 Likes

#3

Hello, tanks for help, but the problem persists, I leave here the logs:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'i', 'node-red-node-base64' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose npm-session d6f6dfdf1522b17e
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/node-red-node-base64 908ms (from cache)
8 silly pacote tag manifest for node-red-node-base64@latest fetched in 1035ms
9 timing stage:loadCurrentTree Completed in 11909ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 66ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 4918ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule node-red-node-base64@0.1.3 checking installable status
17 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 6410ms
18 timing stage:loadIdealTree Completed in 13466ms
19 silly currentTree node-red-project@0.0.1
19 silly currentTree ├── abbrev@1.1.1
...
25 silly saveTree └─┬ node-red-node-sqlite@file:node_modules/node-red-node-sqlite
25 silly saveTree └─┬ sqlite3@4.0.1
25 silly saveTree └─┬ node-pre-gyp@0.10.2
25 silly saveTree ├─┬ needle@2.2.1
25 silly saveTree │ ├── debug@2.6.9
25 silly saveTree │ ├── iconv-lite@0.4.23
25 silly saveTree │ └── sax@1.2.4
25 silly saveTree ├─┬ nopt@4.0.1
25 silly saveTree │ ├── abbrev@1.1.1
25 silly saveTree │ └─┬ osenv@0.1.5
25 silly saveTree │ └── os-tmpdir@1.0.2
25 silly saveTree ├─┬ npm-packlist@1.1.10
25 silly saveTree │ ├── ignore-walk@3.0.1
25 silly saveTree │ └── npm-bundled@1.0.3
25 silly saveTree ├── rimraf@2.6.2
25 silly saveTree └─┬ tar@4.4.4
25 silly saveTree ├─┬ fs-minipass@1.2.5
25 silly saveTree │ └─┬ minipass@2.3.3
25 silly saveTree │ └── yallist@3.0.2
25 silly saveTree ├── minipass@2.3.3
25 silly saveTree ├── minizlib@1.1.0
25 silly saveTree └── yallist@3.0.2
26 warn node-red-project@0.0.1 No repository field.
27 warn node-red-project@0.0.1 No license field.
28 verbose stack Error: ELOOP: too many symbolic links encountered, access '/root/.node-red/node_modules/node-red-node-sqlite'
29 verbose cwd /root/.node-red
30 verbose Linux 3.4.113-sun8i
31 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "node-red-node-base64"
32 verbose node v8.12.0
33 verbose npm v6.4.1
34 error path /root/.node-red/node_modules/node-red-node-sqlite
35 error code ELOOP
36 error errno -40
37 error syscall access
38 error ELOOP: too many symbolic links encountered, access '/root/.node-red/node_modules/node-red-node-sqlite'
39 verbose exit [ -40, true ]

0 Likes

#4

What version of NR?
What version of node.js?
What directory are you in when you run the command?
What platform/os are you using?
What user are you running the command from?

0 Likes

#5

Tanks for help.

  • NR v0.18.7
  • node.js v8.12.0
  • /root/.node-red
  • ARMBIAN 5.38 stable Debian GNU/Linux 8 (jessie) 3.4.113-sun8i
    root
0 Likes

#6

what version of npm?
Just seen its in the original listing > npm@6.4.1
Any reason why you are using root?

0 Likes

#7

Npm is 6.4.1
Reason, i install node-red a long time, and make updates and workes always, I think not have reason to use root.
But now I have many nodes developed in the node-red and I have to lose everything, I do not know how to get out of it.

0 Likes

#8

can i make npm cache clean --force ?

0 Likes

#9

or a downgrade off npm?

0 Likes

#10

Have you searched for the 'ELOOP: too many symbolic links encountered' error to see what others have done?

The problem appears to be related to how you have installed node-red-node-sqlite.

From the log output you shared you can see it appears differently to all of the others:

25 silly saveTree └─┬ node-red-node-sqlite@file:node_modules/node-red-node-sqlite
25 silly saveTree └─┬ sqlite3@4.0.1

What does /root/.node-red/package.json have listed in its dependencies section regarding node-red-node-sqlite ?

You may need to npm remove node-red-node-sqlite and reinstall it cleanly.

0 Likes

#11

Hello, tanks for your time.

My package.json have :

{
"name": "node-red-project",
"description": "A Node-RED Project",
"version": "0.0.1",
"dependencies": {
"node-red-contrib-admin": "0.0.6",
"node-red-contrib-bigtimer": "~1.9.2",
"node-red-contrib-ibm-watson-iot": "^0.2.8",
"node-red-contrib-moment": "~2.0.7",
"node-red-contrib-play-audio": "^2.3.2",
"node-red-contrib-timed-counter": "0.0.1",
"node-red-dashboard": "~2.9.4",
"node-red-node-mysql": "0.0.16",
"node-red-node-ping": "0.0.15",
"node-red-node-random": "^0.1.0",
"node-red-node-serialport": "^0.6.7",
"node-red-node-smooth": "^0.1.0",
"node-red-node-sqlite": "file:node_modules/node-red-node-sqlite"
}
}
When i try : npm remove node-red-node-sqlite

npm ERR! path /root/.node-red/node_modules/node-red-node-sqlite/npm-shrinkwrap.json
npm ERR! code ELOOP
npm ERR! errno -40
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open '/root/.node-red/node_modules/node-red-node-sqlite/npm-shrinkwrap.json'

I already used sqlite, but I no longer need

0 Likes

#12

If you no longer need it, delete the sqlite line in package.json and delete /root/.node-red/node_modules/node-red-node-sqlite.

That should get rid of the symlinks it is complaining about.

0 Likes

#13

can i direct remove in node-modules de directory node-red-node-sqlite after delete in json file?
And after remove directory?
rm -r node-red-node-sqlite ??

0 Likes

#14

Yes, delete the node_modules/node-red-node-sqlite directory.

0 Likes

#15

Thank you so much for your precious time to help.
Thank you ufafafa.
All works fine....
Thanks for everything

0 Likes