Ionic APK build for Android started breaking


#1

Hi All,

here is my problem. recently my ionic build started breaking, and after researching I found that I can no longer use special characters in my plugin versions.
i.e. but it wants all versions to appear without the characters.
i.e. …if you notice the difference

So ok, great I took them out, and everything works. sort of…
Now we are also developing for IOS, and my IOS build will not work without the characters.

my work around for now is to maintain 2 version on config.xml and package.json

has anyone had this happen recently?

thanks!


#2

What do you mean by “special characters”?

And where are these special characters not supposed to be?


#3

Hey there, thanks for a quick reply. sorry if my post was not to clear.

so before when I created the ionic project, config.xml was generated with stuff like the following:

<plugin name="cordova-plugin-statusbar" spec="2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
<plugin name="cordova-sqlite-storage" spec="^2.0.4" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />

you can see that the (spec="~2.2.1") has a “~” in it.

so what I learned was now these were causing Ionic builds to fail (when the APK is built on ionic release profile)
however it all still works great on IOS and xcode.

now if I remove the characters the ionic works great but IOS and xcode fails.


#4

Hmmm, that looks valid to me and matches with the format I have in my config.xml.

What’s the error you’re getting when you have the tilde in the file?

Also, is this a local build or a remote build?


#5

So below if the failure I get on the mac when building xcode if the “special characters” are not present.
it comes when I run the command “ionic serve restore”

Here is 1 link to a post I have been reading:

Restoring Ionic Project...




> ionic-chap-mobile@ ionic:serve /Users/Administrator/Documents/Projects/Ionic/ChapMobile

> ionic-app-scripts serve "--v2" "undefined" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"




module.js:487

    throw err;

    ^




Error: Cannot find module 'typescript'

    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 Object.<anonymous> (/Users/Administrator/Documents/Projects/Ionic/ChapMobile/node_modules/@ionic/app-scripts/dist/logger/logger-typescript.js:6:10)

    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)

    at Function.Module._load (module.js:458:3)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! ionic-chap-mobile@ ionic:serve: `ionic-app-scripts serve "--v2" "undefined" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the ionic-chap-mobile@ ionic:serve script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.




npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/Administrator/.npm/_logs/2017-10-06T20_23_51_989Z-debug.log

There was an error serving your Ionic application: There was an error with the spawned command: serve