Ionic CLI Error after update to 6.9.0

Getting this error suddenly when ever i run any ionic command. Please help. I have tried unistalling and reinstalling ionic cli but helpless. Also tried clearing npm cache. Thanks in advance.

/usr/local/lib/node_modules/@ionic/cli/node_modules/@ionic/utils-fs/dist/index.js:168
exports.pathExists = pathExists;
                   ^

TypeError: Cannot set property pathExists of #<Object> which has only a getter
    at Object.<anonymous> (/usr/local/lib/node_modules/@ionic/cli/node_modules/@ionic/utils-fs/dist/index.js:168:20)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@ionic/cli/node_modules/@ionic/cli-framework/utils/node.js:3:20)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
5 Likes

I’m having the same exact problem, I have changed nothing and my CD/CI is now throwing this error

2 Likes

Me too! I just got this error, tried to re-install 6.8.0 version but error still throws, I re-installed npm as well and nothing happened

please if anyone have a solution, share it please, this is an urgent situation :sob::cold_sweat:

ALL IONIC commands not working and throws same error !!! :broken_heart::broken_heart::broken_heart::broken_heart::broken_heart::broken_heart::broken_heart::broken_heart::broken_heart::broken_heart::broken_heart:

Updated to 6.9.1 fixed it for me.

5 Likes

yup
npm i -g @ionic/cli@6.9.1

4 Likes

npm i -g @ionic/cli@6.9.1

1 Like

I have a similar problem when running “ionic serve” and this is the message:
“TypeError: Cannot set property pathExists of # which has only a getter%”

/usr/local/lib
├── @ionic/cli@6.9.1
├── npm@6.14.4
└── sass@1.23.1