Error TypeError: Cannot read property 'F_OK' of undefined


#1

Hello everyone,
I made an update of ionic in 3.2.0 while I was running “ionic serve”.

When I tried to type my command “ionic cordova build” in the folder of my project it showed me this error:

TypeError: Can not read property ‘F_OK’ of undefined

And since I can not do anything anymore … Surely you have other information to ask me, I remain available.

thank you in advance

sorry, google translate


#2

open terminal and type :

sudo npm cache clean -f
sudo npm install -g n
sudo n stable
npm rebuild node-sass

works like charm :sunglasses:


#3

Thanks you it’s working :smiley


#4

Thanks for taking the time to answer the question. I was getting the TypeError when running npm install -g ionic@latest. Your solution works well but I am having a hard time understanding what exactly that error is :confused: Are you able to explain the issue and how the lines solve it? Thanks again


#5

I have the same problem with a twist. I am running Mac El Capitan. When I run “ionic” from anywhere but a project folder I get the standard Ionic version screen. If I run “ionic” from a project then I get the "TypeError: Cannot read property ‘F_OK’ of undefined

I have tried to remove Ionic/Cordova through the command line and I have removed it manually and I cannot get Ionic to work anymore. I am lost…


#6

Update NodeJS and rebuild node-sass !


#7

Thank you for your reply.

Here is how I got it to work, I ran this command: sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

That reset the rights on the node modules. Then I remove the node_modules from the project and ran “npm install” and that got everything working. Very weird…


#8

Everybody, please use nvm. It makes all of these tedious node environment issues go away.