Hi, I bought an app on the web but at the moment of executing the npm install I get the following error. I would appreciate your help.

(Carlos1229) #1

npm ERR! path /Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.staging/@ionic

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall rmdir

npm ERR! Error: EACCES: permission denied, rmdir ‘/Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.staging/@ionic

npm ERR! { Error: EACCES: permission denied, rmdir ‘/Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.staging/@ionic

npm ERR! stack: ‘Error: EACCES: permission denied, rmdir ‘/Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.staging/@ionic’’,

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! syscall: ‘rmdir’,

npm ERR! path: ‘/Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.staging/@ionic’ }

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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/Administrador/.npm/_logs/2019-03-17T02_07_29_317Z-debug.log

0 Likes

(John Gee) #2

What command are you running? (Just npm install ?)

What are the permission for the folder in the error message? Please run this command and post the output:

ls -al ‘/Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.staging/@ionic’ 
0 Likes

(Carlos1229) #3

Thank you very much john. if I work thanks. Now when I run the ionic cordova platform add android I get the following error.

MacBook-Air-de-Administrador:User Administrador$ ionic cordova platform add android
[ WARN ] Detected locally installed Ionic CLI, but it’s too old–using global CLI.
> cordova platform add android --save
Using cordova-fetch for cordova-android@^7.1.4
Failed to fetch platform cordova-android@^7.1.4
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! Darwin 16.7.0
npm ERR! argv “/usr/local/bin/node” “/Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/node_modules/.bin/npm” “install” “cordova-android@^7.1.4” “–production” “–save-exact”
npm ERR! node v8.11.2
npm ERR! npm v2.15.12
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package @ionic-native/core@3.14.0 does not satisfy its siblings’ peerDependencies requirements!
npm ERR! peerinvalid Peer @ionic-native/background-mode@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/browser-tab@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/call-number@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/camera@3.14.0 wants @ionic-native/core@^3.6.0
npm ERR! peerinvalid Peer @ionic-native/diagnostic@3.14.0 wants @ionic-native/core@^3.6.0
npm ERR! peerinvalid Peer @ionic-native/firebase@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/google-maps@4.2.1 wants @ionic-native/core@^3.6.0 || >=4.0.0
npm ERR! peerinvalid Peer @ionic-native/http@3.14.0 wants @ionic-native/core@^3.6.0
npm ERR! peerinvalid Peer @ionic-native/in-app-browser@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/location-accuracy@3.14.0 wants @ionic-native/core@^3.6.0
npm ERR! peerinvalid Peer @ionic-native/onesignal@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/paypal@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/social-sharing@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/splash-screen@3.12.1 wants @ionic-native/core@^3.6.0
npm ERR! peerinvalid Peer @ionic-native/status-bar@3.12.1 wants @ionic-native/core@^3.6.0
npm ERR! peerinvalid Peer @ionic-native/stripe@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! peerinvalid Peer @ionic-native/vibration@4.9.1 wants @ionic-native/core@^4.2.0
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Administrador/Documents/1.ionic_3_proyectos/roller/mono/Projects/User/npm-debug.log
[ ERROR ] An error occurred while running subprocess cordova .
cordova platform add android --save exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.

0 Likes

(John Gee) #4

It looks like your problems are now with “ionic cordova” and not with npm. I found this link with same looking errors as you are seeing.

0 Likes

(Patrick) #5

I am an experienced Cordova + Ionic developer. It looks like the app you bought is pretty far out of date, and there’s a few things that you need to do to bring it up to date.

  1. npm v2.15.12
    You really need to be using a more recent version of npm especially if you’re on Node 8.11. This is the reason for the error, in older versions of NPM, failed peer dependencies cause failed installs. That behavior was removed in later versions of NPM.

  2. Remove ionic from the local packages dev dependencies and use npm i -g ionic

  3. You can safely upgrade all of the @ionic-native packages to 4.20.0, and really all of them should be on the latest 4.x version unless you explicitly know of version mismatches. Do NOT use 5.x, the import model changed for Angular 7 and the upgrade path is alot more work.

  4. More generally I recommend running npm outdated and seeing what else is outdated. It’s probable that some of those cordova plugins themselves also need updating.

Hope that helps a little.

1 Like

(system) closed #6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

0 Likes