When attempting to build ios in Ionic3 using the command: ionic cordova build ios
, I encounter the error "Cannot read property toLowerCase of undefined".
Below is the log output with the --verbose flag:
> ionic-app-scripts build --target cordova --platform ios
[12:09:39] ionic-app-scripts 3.1.11
[12:09:39] build dev started ...
[12:09:39] clean started ...
[12:09:39] clean finished in 4 ms
[12:09:39] copy started ...
[12:09:39] deeplinks started ...
[12:09:40] deeplinks finished in 104 ms
[12:09:40] transpile started ...
[12:09:43] transpile finished in 3.15 s
[12:09:43] preprocess started ...
[12:09:43] preprocess finished in less than 1 ms
[12:09:43] webpack started ...
[12:09:43] copy finished in 3.42 s
[12:09:55] webpack finished in 11.83 s
[12:09:55] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[12:09:57] sass finished in 2.10 s
[12:09:57] postprocess started ...
[12:09:57] postprocess finished in 9 ms
[12:09:57] lint started ...
[12:09:57] build dev finished in 17.38 s
[...Remaining log output truncated for brevity...]
[12:10:53] tslint: src/app/app.component.ts, line: 13
All imports on this line are unused.
L12: import 'rxjs/add/operator/take';
L13: import { take } from 'rxjs/operators/take'
[12:10:53] lint finished in 4.32 s
ionic:cli-utils:lib:hooks Looking for ionic:build:after npm script. +25s
> cordova build ios --verbose
No scripts found for hook "before_build".
[ERROR] An error occurred while running subprocess cordova.
cordova build ios --verbose exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
My code works fine when I run ionic serve
, but the issue arises during the ios build process. Any insights on what might be causing this error?