0

I have been trying to install Cordova and ionic on ubuntu 18.04. Cordova installed fine, but ionic generated this error:

   WARN checkPermissions Missing write access to /usr/lib/node_modules/ionic
npm ERR! path /usr/lib/node_modules/ionic
npm ERR! code ELOOP
npm ERR! errno -40
npm ERR! syscall access
npm ERR! ELOOP: too many symbolic links encountered, access '/usr/lib/node_modules/ionic'

I tried upgrading npm to version 6.10.1. Still, it did not work! Also, when I used ls -la /usr/lib/node_modules I got the following:

 lrwxrwxrwx   1 root marwa    5 Jul 18 22:32 ionic -> ionic

1 Answer 1

0

It's not likely a permission issue but instead a file recursion issue.

This happens sometimes when you have a recursive dependency in your package.json that asks the system to install a copy of itself. For instance if you might have a dependency in the file that says

"iconic": "file:node_modules/iconic"

(or similar) that could cause the kind of symbolic file loop that would generate that kind of error.

You might be able to fix by removing that line in package.json and then retrying your install. You might find you don't need to use sudo. Here is a help reference for someone else who had a similar issue error and solution.

1
  • I have fixed the issue by removing the symbolic link using sudo rm ionic and reinstalled ionic. It worked!
    – Marwa
    Jul 18, 2019 at 22:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .