I wrote an Ionic v1 app two years ago targeting iOS and Android. I need to rebuild the app so it is compatible with iOS 11. I also need to troubleshoot why local notifications no longer work. I installed the latest versions of Ionic CLI (3.7.0), Cordova (7.0.1), Node (8.2.1), and NPM (5.3.0) but am having a difficult time getting my old app to build.
At this point I’m trying to build a brand new Ionic v1 app with the hope that I can copy over relevant code from my old project. I’m trying to add ngCordova to the new app and get Error: Cannot find module 'internal/fs'
. Any thoughts on how to fix?
STR:
ionic start ExampleApp blank --type ionic1 --n "ExampleApp" --cordova
cd ExampleApp
ionic cordova platform add ios
ionic cordova platform add android
bower install ngCordova
Error:
Error: Cannot find module ‘internal/fs’
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at evalmachine.:40:20
at Object. (/usr/local/lib/node_modules/bower/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:569:30)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
Info:
cli packages: ([...excludedByMe]/node_modules)
@ionic/cli-plugin-cordova : 1.6.2
@ionic/cli-plugin-gulp : 1.1.1
@ionic/cli-plugin-ionic1 : 2.1.1
@ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
Gulp CLI : CLI version 3.9.0 Local version 3.9.1
local packages:
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic1 1.3.3
System:
Node : v8.2.1
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 4.1.1
npm : 5.3.0