I am facing an error upon performing ionic cordova build ios. This error is:
Error: ./src/app/app.module.ts
Module not found: Error: Can't resolve '@ionic-native/file' in '/Users/justinfrevert/Desktop/AceAdz-App/app-copy/src/app'
resolve '@ionic-native/file' in '/Users/justinfrevert/Desktop/AceAdz-App/app-copy/src/app'
Parsed request is a module
using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./src/app)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./src/app)
resolve as module
looking for modules in /Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules
using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./node_modules)
using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./node_modules/@ionic-native/file)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file.json doesn't exist
as directory
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file doesn't exist
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file.ts]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file.js]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file.json]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/file]
@ ./src/app/app.module.ts 23:0-42
@ ./src/app/main.ts,./src/app/app.module.ts
Module not found: Error: Can't resolve '@ionic-native/photo-library' in '/Users/justinfrevert/Desktop/AceAdz-App/app-copy/src/app'
resolve '@ionic-native/photo-library' in '/Users/justinfrevert/Desktop/AceAdz-App/app-copy/src/app'
Parsed request is a module
using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./src/app)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./src/app)
resolve as module
looking for modules in /Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules
using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./node_modules)
using description file: /Users/justinfrevert/Desktop/AceAdz-App/app-copy/package.json (relative path: ./node_modules/@ionic-native/photo-library)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library.json doesn't exist
as directory
/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library doesn't exist
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library.ts]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library.js]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library.json]
[/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic-native/photo-library]
@ ./src/app/app.module.ts 28:0-59
@ ./src/app/main.ts
at new BuildError (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
at emitRecords.err (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/webpack/lib/Compiler.js:368:12)
at next (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/Users/justinfrevert/Desktop/AceAdz-App/app-copy/node_modules/webpack/lib/Compiler.js:365:9)
This has occurred after I have dealt with a number of dependency issues. Namely, I updated most pacages including Geolocation. Geolocation threw errors related to the types that I was trying to pass as arguments into watchPosition(). This did not occur after a code change, but a version change. So I decided to try to revert to the old version. I reverted from the latest version, 4.3.2, to 3.14. I then got the above error. I realized that the version I was on when it was working was, 3.11.0. I reverted to that version, but i still got the above error. I then reverted back to 4.3.2 again and still got the above error. I then tried uninstalling the cordova plugin as well as the npm package, still got the error.
my package.json:
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "^4.1.2",
"@angular/compiler": "4.1.2",
"@angular/compiler-cli": "4.1.2",
"@angular/forms": "4.1.2",
"@angular/http": "4.1.2",
"@angular/platform-browser": "^4.1.2",
"@angular/platform-browser-dynamic": "4.1.2",
"@angular/router": "^4.1.3",
"@angular/tsc-wrapped": "^4.1.3",
"@ionic-native/camera": "^4.3.2",
"@ionic-native/core": "^3.10.2",
"@ionic-native/facebook": "^4.3.2",
"@ionic-native/geolocation": "^4.3.2",
"@ionic-native/keyboard": "^3.12.1",
"@ionic-native/screen-orientation": "^4.3.2",
"@ionic-native/splash-screen": "^3.10.2",
"@ionic-native/status-bar": "3.10.2",
"@ionic/cli-plugin-cordova": "1.5.0",
"@ionic/storage": "2.0.1",
"angularfire2": "^5.0.0-rc.0",
"cordova-browser": "^4.1.0",
"cordova-ios": "^4.5.2",
"cordova-plugin-console": "^1.0.5",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.2",
"cordova-plugin-whitelist": "^1.3.1",
"firebase": "^4.6.0",
"ionic": "3.6.0",
"ionic-angular": "3.3.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.11"
},
"devDependencies": {
"@angular/common": "^4.1.2",
"@angular/compiler": "^4.1.2",
"@angular/core": "4.1.2",
"@angular/platform-browser": "^4.1.2",
"@ionic/app-scripts": "^3.0.1",
"@ionic/cli-plugin-cordova": "1.6.2",
"@ionic/cli-plugin-ionic-angular": "1.4.1",
"cordova": "^7.1.0",
"ionic": "3.15.2",
"ionic-angular": "^3.3.0",
"typescript": "2.3.3"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"description": "AceAdz",
"cordova": {
"plugins": {
"cordova-plugin-screen-orientation": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": " "
}
}
}
}
Please let me know what I can do for this.