IONIC Build Errors with solutions

Posted on Updated on

Hi friends,

As I’m working on different apps, on multiple platforms and things, I thought I’d start a list of some of the errors I’d been getting, and how I solved them in IONIC.

Some of these solutions may help you. Most of these are for v3 of IONIC. Other settings vary.

I’m sure I’ll keep adding to this.

It’s a very messy file, but if Google brings you here, I hope it will help you.

 


Failed to install ‘cordova-sqlite-storage’: CordovaError: Using “requireCordovaModule” to load non-cordova module “q” is not supported.
https://github.com/xpbrew/cordova-sqlite-storage/issues/856#issuecomment-497298630

Cordova error: Using “requireCordovaModule” to load non-cordova module “q” is not supported
https://stackoverflow.com/a/55321875/1190051


https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/issues/205#issuecomment-405052996

simply add this
cordova plugin add cordova-android-support-gradle-release –variable ANDROID_SUPPORT_VERSION=27.+
and run/build again.


ERROR ITMS-90174: “Missing Provisioning Profile – Apps must contain a provisioning profile in a file named embedded.mobileprovision.”
https://stackoverflow.com/a/52654888/1190051


> cordova build ios –release
CordovaError: Promise rejected with non-error: ‘ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/ios-control/ios-deploy into your path, or do \’npm install -g ios-deploy\”
at cli.catch.err (/Users/stephenmonro/ionicApps/C4I International/node_modules/cordova/bin/cordova:29:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.

cordova build ios –release exited with exit code 1.

Re-running this command with the –verbose flag may provide more information.
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Updating spec repo `master`
$ /usr/bin/git -C /Users/stephenmonro/.cocoapods/repos/master fetch origin –progress
remote: Enumerating objects: 1441, done.
remote: Counting objects: 100% (1441/1441), done.
remote: Compressing objects: 100% (236/236), done.
remote: Total 2771 (delta 1275), reused 1191 (delta 1191), pack-reused 1330
Receiving objects: 100% (2771/2771), 320.66 KiB | 767.00 KiB/s, done.
Resolving deltas: 100% (1828/1828), completed with 553 local objects.
From https://github.com/CocoaPods/Specs
5bdc3da58dc..70702dce5ff master -> origin/master
$ /usr/bin/git -C /Users/stephenmonro/.cocoapods/repos/master rev-parse –abbrev-ref HEAD
master
$ /usr/bin/git -C /Users/stephenmonro/.cocoapods/repos/master reset –hard origin/master
HEAD is now at 70702dce5ff [Add] TidySplits 1.0.4
Updating spec repo `trunk`

CocoaPods 1.9.0.beta.3 is available.
To update use: `sudo gem install cocoapods –pre`
[!] This is a test version we’d love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.9.0.beta.3

The file /Users/stephenmonro/ionicApps/C4I International/platforms/ios/Christians for Israel.xcworkspace does not exist.
Problem solved here: unplug the ipad, or the device.
https://github.com/ios-control/ios-deploy/issues/332#issuecomment-552854357

Solution:

I experience this error if my phone is connected to my computer (via cable) when I am running the build command.

Simply unplugging the cable solved the problem.

 


npm update


ERROR:
[app-scripts] fs.js:114
[app-scripts] throw err;
[app-scripts] ^
[app-scripts] Error: ENOENT: no such file or directory, scandir ‘/Users/stephenmonro/ionicApps/wpimportsqlite/node_modules/node-sass/vendor’
[app-scripts] at Object.readdirSync (fs.js:785:3)

SOURCE:
https://github.com/sass/node-sass/issues/1579#issuecomment-452181858

FIX:
node ./node_modules/node-sass/scripts/install.js


ERRORS:

stephenmonro@SMMMacPro:~/ionicApps/wpimportsqlite$ ionic serve
> ionic-app-scripts serve –address localhost –port 8101 –livereload-port 35730 –dev-logger-port 53704 –nobrowser
[app-scripts] [23:24:14] ionic-app-scripts 3.2.4
[app-scripts] [23:24:14] watch started …
[app-scripts] [23:24:14] build dev started …
[app-scripts] [23:24:14] Proxy added:/wp-json => https://www.c4israel.org/wp-json
[app-scripts] [23:24:14] Proxy added:/resources/app/pdf => https://www.c4israel.com.au/resources/app/pdf/
[app-scripts] [23:24:14] clean started …
[app-scripts] [23:24:14] clean finished in 2 ms
[app-scripts] [23:24:14] copy started …
[app-scripts] [23:24:14] deeplinks started …
[app-scripts] [23:24:15] deeplinks finished in 336 ms
[app-scripts] [23:24:15] transpile started …
[app-scripts] [23:24:22] typescript: node_modules/@types/node/events.d.ts, line: 21
[app-scripts] ‘=’ expected.
[app-scripts] L20: function on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>;
[app-scripts] L21: const captureRejectionSymbol: unique symbol;
[app-scripts] ‘=’ expected.
[app-scripts] [23:24:22] typescript: node_modules/@types/node/events.d.ts, line: 32
[app-scripts] L32: const errorMonitor: unique symbol;
[app-scripts] [23:24:23] typescript: node_modules/@types/node/repl.d.ts, line: 361
[app-scripts] ‘=’ expected.
[app-scripts] L361: const REPL_MODE_SLOPPY: unique symbol;
[app-scripts] ‘=’ expected.
[app-scripts] [23:24:23] typescript: node_modules/@types/node/repl.d.ts, line: 367
[app-scripts] [23:24:23] typescript: node_modules/@types/node/util.d.ts, line: 26
[app-scripts] L367: const REPL_MODE_STRICT: unique symbol;
[app-scripts] ‘=’ expected.
[app-scripts] L25: let replDefaults: InspectOptions;
[app-scripts] L26: const custom: unique symbol;
[app-scripts] ‘=’ expected.
[app-scripts] L120: namespace promisify {
[app-scripts] L121: const custom: unique symbol;
[app-scripts] [23:24:23] typescript: node_modules/@types/node/util.d.ts, line: 121
[app-scripts] [23:24:23] typescript: node_modules/@types/node/events.d.ts, line: 21
[app-scripts] Cannot find name ‘unique’.
[app-scripts] L20: function on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>;
[app-scripts] L21: const captureRejectionSymbol: unique symbol;
[app-scripts] [23:24:23] typescript: node_modules/@types/node/events.d.ts, line: 21
[app-scripts] Cannot find name ‘symbol’. Did you mean ‘Symbol’?
[app-scripts] L20: function on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>;
[app-scripts] L21: const captureRejectionSymbol: unique symbol;
[app-scripts] Cannot find name ‘unique’.
[app-scripts] [23:24:23] typescript: node_modules/@types/node/events.d.ts, line: 32
[app-scripts] L32: const errorMonitor: unique symbol;
[app-scripts] [23:24:23] typescript: node_modules/@types/node/events.d.ts, line: 32
[app-scripts] Cannot find name ‘symbol’. Did you mean ‘Symbol’?
[app-scripts] L32: const errorMonitor: unique symbol;
[app-scripts] Cannot find name ‘unique’.
[app-scripts] [23:24:23] typescript: node_modules/@types/node/repl.d.ts, line: 361
[app-scripts] L361: const REPL_MODE_SLOPPY: unique symbol;
[app-scripts] Cannot find name ‘symbol’. Did you mean ‘Symbol’?
[app-scripts] [23:24:23] typescript: node_modules/@types/node/repl.d.ts, line: 361
[app-scripts] L361: const REPL_MODE_SLOPPY: unique symbol;
[app-scripts] Cannot find name ‘unique’.
[app-scripts] [23:24:23] typescript: node_modules/@types/node/repl.d.ts, line: 367
[app-scripts] [23:24:23] typescript: node_modules/@types/node/repl.d.ts, line: 367
[app-scripts] L367: const REPL_MODE_STRICT: unique symbol;
[app-scripts] Cannot find name ‘symbol’. Did you mean ‘Symbol’?
[app-scripts] L367: const REPL_MODE_STRICT: unique symbol;
[app-scripts] Cannot find name ‘unique’.
[app-scripts] L25: let replDefaults: InspectOptions;
[app-scripts] [23:24:23] typescript: node_modules/@types/node/util.d.ts, line: 26
[app-scripts] [23:24:23] typescript: node_modules/@types/node/util.d.ts, line: 26
[app-scripts] L26: const custom: unique symbol;
[app-scripts] Cannot find name ‘symbol’. Did you mean ‘isSymbol’?
[app-scripts] L25: let replDefaults: InspectOptions;
[app-scripts] L26: const custom: unique symbol;
[app-scripts] Cannot find name ‘unique’.
[app-scripts] L120: namespace promisify {
[app-scripts] L121: const custom: unique symbol;
[app-scripts] [23:24:23] typescript: node_modules/@types/node/util.d.ts, line: 121
[app-scripts] [23:24:23] typescript: node_modules/@types/node/util.d.ts, line: 121
[app-scripts] Cannot find name ‘symbol’.
[app-scripts] L120: namespace promisify {
[app-scripts] L121: const custom: unique symbol;

[INFO] Development server running!

Local: http://localhost:8101

Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8101!

[app-scripts] [23:24:23] watch ready in 8.56 s
[app-scripts] [23:24:23] copy finished in 8.53 s

SOURCE:
https://forum.ionicframework.com/t/typescript-error-expected-and-more/181140/10?u=stephenmonro
FIX:
npm install typescript@2.7.2


Error:

[23:51:47] typescript error
Cannot find type definition file for ‘@types’.

[23:51:47] ionic-app-script task: “build”
[23:51:47] Error: Failed to transpile TypeScript
Error: Failed to transpile TypeScript
at errorCheckProgram (/Users/stephenmonro/ionicApps/wpimportsqlite/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:119:39)
at Object.<anonymous> (/Users/stephenmonro/ionicApps/wpimportsqlite/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:89:21)
at step (/Users/stephenmonro/ionicApps/wpimportsqlite/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/stephenmonro/ionicApps/wpimportsqlite/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/stephenmonro/ionicApps/wpimportsqlite/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[ERROR] An error occurred while running subprocess ionic-app-scripts.

LINK:
https://github.com/ionic-team/ionic-app-scripts/issues/1529#issuecomment-496652630

SOLUTION:
What seems to fix it is to add
“types”: []
to the
tsconfig.json’s compilerOptions.


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s