Error in cordova-plugin-file so I can't start on mobile app


#1

Hello, so I’m trying to run my app on mobile using meteor run ios-device but this message keeps poping up, do any of you has an idea on what I’m missing or if there’s something I can do to fix it?

% Executing "after_plugin_add"  hook for all plugins.                              
Adding plugin cordova-plugin-file@4.1.1 to Cordova project                         
% Executing "before_plugin_add"  hook for all plugins.                             
% Calling plugman.fetch on plugin "cordova-plugin-file@4.1.1"                      
% Fetching plugin "cordova-plugin-file@4.1.1" via npm                              
% Error during untar for /Users/jeronimocosio/.npm/cordova-plugin-file/4.1.1/package.tgz: Error: EPERM, utime '/Users/jeronimocosio/.npm/cordova-plugin-file/4.1.1/package/.npmignore'
=> Errors executing Cordova commands:                                              
                                                                                   
   While adding plugin cordova-plugin-file@4.1.1 to Cordova project:               
   Cordova error: Failed to fetch plugin cordova-plugin-file@4.1.1 via registry.   
   Probably this is either a connection problem, or plugin spec is incorrect.
   Check your connection and plugin name/version/URL.
   Error: EPERM, utime '/Users/jeronimocosio/.npm/cordova-plugin-file/4.1.1/package/.npmignore'
   at registry.fetch.fail.then.pinfo
   (/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/plugman/fetch.js:146:33)
   at _rejected (/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:797:24)
   at /Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:823:30
   at Promise.when (/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:1035:31)
   at Promise.promise.promiseDispatch
   (/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:741:41)
   at /Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:557:44
   at flush (/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
   at process._tickCallback (node.js:458:13)
   (If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again with the --verbose option to help diagnose the issue.)

/Users/jeronimocosio/.meteor/packages/meteor-tool/.1.3.2_4.1k2o4mp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116
      throw error;
            ^

Managing Cordova Dependencies across Meteor versions is a nightmare
#2

It turned out to be an error with some NPM permissions, this resolved it:

npm cache clean

In case someone else gets this problem.