Ionic './ber/index' module not found

I'm building an Ionic app and wanted to build it for iOS. It didn't work. I got an error that a module was not found. After a while I fixed this by installing several modules using npm install MODULENAME -g

Now I got the following error:

Error: Cannot find module './ber/index'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js:6:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

but I don't think that ./ber/index is a module. Which is what npm says. How am I going to solve this?

Also, why are all my npm modules missing? Is there a way to solve this? Now I manually installed using nmp install MODULENAME -g but it never stops ...