1

Platform: Ionic Trying to install a plugin, no pluging getting installed. Following error appears:

ionic cordova plugin add onesignal-cordova-plugin
> cordova plugin add onesignal-cordova-plugin --save
Installing "onesignal-cordova-plugin" for ios

Failed to install 'onesignal-cordova-plugin': Error: EPERM: operation not permitted, chmod '/Users/heptagon/infos/platforms/ios/cordova/version'
    at Error (native)
    at Object.fs.chmodSync (fs.js:1154:18)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:176:24
    at Array.map (native)
    at callEngineScripts (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:169:17)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:311:16
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44

(node:1127) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EPERM: operation not permitted, chmod '/Users/{my username is here }/infos/platforms/ios/cordova/version'
John
  • 21
  • 3
  • Try to delete this directory `/usr/.cordova/lib/npm_cache/onesignal-cordova-plugin` and then try to reinstall the plugin – matthiasunt Mar 31 '18 at 12:03
  • Fixed the problem with updating ruby version,it took me weeks to realise this, found the solution here: https://stackoverflow.com/questions/38194032/how-to-update-ruby-version-2-0-0-to-the-latest-version-in-mac-osx-yosemite – John Mar 31 '18 at 19:09
  • I had the same error and was able to fix it by uninstalling phonegap. – thefoyer Jul 13 '18 at 15:54

1 Answers1

1

Fixed the problem with updating ruby version,it took me weeks to realise this, found the solution here: How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

John
  • 21
  • 3