TypeError: Cannot read property 'close' of undefined

TypeError: Cannot read property ‘close’ of undefined
at Object. (C:\mobileapps\pwash\node_modules\ionic\node_modules\chalk\index.js:72:75)
at Module._compile (module.js:635:30)
at Object.Module._extensions…js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\mobileapps\pwash\node_modules\ionic\dist\index.js:6:17)
at Module._compile (module.js:635:30)

A week ago everything was working fine, without any update or changes, This error display when running ionic command in my ionic project folder.

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

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

System:

Node : v8.9.1
npm  : 5.5.1
OS   : Windows 10

Misc:

backend : pro

$ cordova -v
7.1.0

1 Like

I’m also getting this same issue :frowning:

is chalk dependecy conflict,
delete node_module folder and reinstall it using npm install

this solve it for me

Hmm, mine now seems to be working again too (took several attempts of clearing node modules and platforms before it finally worked)

I deleted the node_modules folder and installed using npm install. But still having that same issue. Please help me out. I’m new to Ionic Development.

I think the issue was of the change in the name of menuCntrl to menuCtrl in the app.component.ts

I changed the name then I didn’t found any problem then.