Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM : checkPermissions Missing write access to /.../node_modules/is

Tags:

node.js

npm

I am getting following error every time I run a npm install on my project:

npm WARN checkPermissions Missing write access to /../node_modules/is
npm ERR! path /.../node_modules/is
npm ERR! code ELOOP
npm ERR! errno -62
npm ERR! syscall access
npm ERR! ELOOP: too many symbolic links encountered, access '/.../node_modules/is'

npm ERR! A complete log of this run can be found in:
npm ERR!     /.../.npm/_logs/2017-07-14T15_19_32_340Z-debug.log

Issue gets resolved after I delete a shortcut file called "is" in my node_modules folder. But it gets re-generated again after one successful npm install run.

enter image description here

Following is my package.json:

{
    "name": "SDKIonic",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "^4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@ionic-native/core": "3.10.2",
        "@ionic-native/splash-screen": "3.10.2",
        "@ionic-native/status-bar": "3.10.2",
        "@ionic/storage": "2.0.1",
        "airwatch-sdk-plugin": "^1.0.7",
        "cordova-android": "^6.2.3",
        "cordova-ios": "^4.4.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "ionic-angular": "3.4.2",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "is": "file:node_modules/is",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12"
    },
    "devDependencies": {
        "@ionic/app-scripts": "1.3.7",
        "@ionic/cli-plugin-cordova": "1.4.1",
        "@ionic/cli-plugin-ionic-angular": "1.3.1",
        "typescript": "2.3.3"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "com.airwatch.awsdkplugin": {}
        },
        "platforms": [
            "android",
            "ios"
        ]
    }
}

I tried changing permission to read-write for everyone but no luck.

like image 461
java_doctor_101 Avatar asked Jul 14 '17 15:07

java_doctor_101


People also ask

How do I install NPM globally?

Install Package Globally NPM installs global packages into /<User>/local/lib/node_modules folder. Apply -g in the install command to install package globally.

How do I update NPM package manager?

Method 1: Using npm update command to update the node package manager. Method 2: Using npm@latest command to update the node package manager. Method 3: Using PPA repository (only for Linux). Method 4: Using cache cleaning & stable installing (only for Linux).


2 Answers

If you are in a mac or any unix based system try to run the command again as root/Administrator.

sudo npm install
like image 112
Stiven Fortes Avatar answered Sep 28 '22 18:09

Stiven Fortes


This is a recursive dependency (the is dependency points to node_modules/is, which is also where the is dependency itself will get installed):

"is": "file:node_modules/is"

If you mean to install the is package (this one), remove that line from your package.json and install it properly:

npm i is --save
like image 25
robertklep Avatar answered Sep 28 '22 16:09

robertklep