Ionic Broke?

Hi,
So my CLI has been running fine with no problems lately. I should have all the up-to-date packages, etc. But, for some reason I’m keep getting errors and I’ve tried everything. I’m keep resulting the same issue and making no progress… I’ve tried everything, it won’t let me uninstall to try re-installing it. I tried granting all permissions where needed. Nothing works.

Please help,
thanks!


Error Codes:
ENOENT, EPERM (-4048)

I have Ionic, Cordova, NPM and Android installed in C:/.

Ionic Info:

c:\Users\*****\Documents\transitiontest>ionic info

cli packages: (C:\Users\*****\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 25.2.5
    Node              : v7.6.0
    npm               : 5.4.0
    OS                : Windows 10


c:\Users\*****\Documents\transitiontest>

Error after trying to remove ionic as System32:

Your environment has been set up for using Node.js 7.6.0 (x64) and npm.

C:\Windows\System32>npm rm ionic
npm WARN saveError ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm WARN System32 No description
npm WARN System32 No repository field.
npm WARN System32 No README data
npm WARN System32 No license field.

up to date in 0.14s

C:\Windows\System32>

Error after trying to remove it as main Administrator:

c:\Users\*****>npm rm ionic
npm WARN saveError ENOENT: no such file or directory, open 'c:\Users\*****\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'c:\Users\*****\package.json'
npm WARN Zenzia No description
npm WARN Zenzia No repository field.
npm WARN Zenzia No README data
npm WARN Zenzia No license field.

up to date in 0.206s

c:\Users\*****>

Error after trying to add platform android as main Administrator:

c:\Users\*****\Documents\transitiontest>ionic cordova platform add android --save
> cordova platform add android --save
× Running command - failed!
[ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2

        Error: Failed to fetch platform cordova-android@~6.2.2
        Probably this is either a connection problem, or platform spec is
        incorrect.
        Check your connection and platform name/version/URL.
        Error: cmd: Command failed with exit code 4294963248 Error output:
        npm ERR! path
        c:\Users\*****\Documents\transitiontest\node_modules\fsevents\node_modules\aws-sign2\package.json
        npm ERR! code EPERM
        npm ERR! errno -4048
        npm ERR! syscall unlink
        npm ERR! Error: EPERM: operation not permitted, unlink
        'c:\Users\*****\Documents\transitiontest\node_modules\fsevents\node_modules\aws-sign2\package.json'
        npm ERR!  { Error: EPERM: operation not permitted, unlink
        'c:\Users\*****\Documents\transitiontest\node_modules\fsevents\node_modules\aws-sign2\package.json'
        npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink
        \'c:\\Users\\*****\\Documents\\transitiontest\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json\'',
        npm ERR!   errno: -4048,
        npm ERR!   code: 'EPERM',
        npm ERR!   syscall: 'unlink',
        npm ERR!   path:
        'c:\\Users\\*****\\Documents\\transitiontest\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json'
        }
        npm ERR!
        npm ERR! Please try running this command again as root/Administrator.

        npm ERR! A complete log of this run can be found in:
        npm ERR!
        C:\Users\*****\AppData\Roaming\npm-cache\_logs\2017-09-04T05_02_12_689Z-debug.log

c:\Users\*****\Documents\transitiontest>

Error after trying to install plugin ionic-native-page-transitions:

c:\Users\*****\Documents\transitiontest>ionic cordova plugin add com.telerik.plugins.nativepagetransitions
× Running command - failed!
[ERROR] An error occurred while running cordova plugin add

        com.telerik.plugins.nativepagetransitions --save (exit code 1):

        Error: Failed to fetch plugin com.telerik.plugins.nativepagetransitions
        via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.
        Error: cmd: Command failed with exit code 4294963248 Error output:
        npm ERR! path
        c:\Users\*****\Documents\transitiontest\node_modules\fsevents\node_modules\abbrev\package.json
        npm ERR! code EPERM
        npm ERR! errno -4048
        npm ERR! syscall unlink
        npm ERR! Error: EPERM: operation not permitted, unlink
        'c:\Users\*****\Documents\transitiontest\node_modules\fsevents\node_modules\abbrev\package.json'
        npm ERR!  { Error: EPERM: operation not permitted, unlink
        'c:\Users\*****\Documents\transitiontest\node_modules\fsevents\node_modules\abbrev\package.json'
        npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink
        \'c:\\Users\\*****\\Documents\\transitiontest\\node_modules\\fsevents\\node_modules\\abbrev\\package.json\'',
        npm ERR!   errno: -4048,
        npm ERR!   code: 'EPERM',
        npm ERR!   syscall: 'unlink',
        npm ERR!   path:
        'c:\\Users\\*****\\Documents\\transitiontest\\node_modules\\fsevents\\node_modules\\abbrev\\package.json'
        }
        npm ERR!
        npm ERR! Please try running this command again as root/Administrator.

        npm ERR! A complete log of this run can be found in:
        npm ERR!
        C:\Users\*****\AppData\Roaming\npm-cache\_logs\2017-09-04T05_09_41_104Z-debug.log

c:\Users\*****\Documents\transitiontest>

Regards,
Neonic1

  1. The real solution to your problem: Uninstall your node, install nvm (or nvm-windows when you are using Windows), install a new node with this, then install ionic and cordova again and try your command again. The problem should be gone.

Now:

There is no ionic installed there. Do you mean the global Ionic? Then use -g.

See above.

See 1) at the beginning.

See 1) at the beginning.

2 Likes

I deleted node, but how I install that?
I don’t know many frameworks or cli, I’m comfortable on my node.
I don’t know anything about installing this… I don’t think at least.

Regards,
Neonic1

Use the power that is Google: You are on Windows, so google for nvm-windows. You will find a Github page with elaborate installation instructions.

Thanks, I got it. Much appreciated.