Closed mluis closed 6 years ago
@mluis
Well... I am a huge fan of AngularJS and I feel very comfortable building web apps with it and I still reach for it, but when it comes to Ionic, I think it is best to follow where the Ionic team are focusing their attention, which is Ionic 2 and Angular2|3|4|5 or whatever version is the latest!
I am not the greatest fan of Angular 2, I feel it gets in the way more than Angular 1 and I am reallly looking forward to Ionic 4 being written in StencilJS 😎
Anyway, the documentation for Ionic 1 says:
For new apps, we strongly recommend the latest version of Ionic which comes with the latest version of Angular, many new components, enhanced performance, and more.
If you really see a use case for Ionic 1, I can create a branch, but I am keen to hear of your use case for Ionic 1 as opposed to Ionic 2, which of course also targets PWA apps?
hi @paulsutherland
Thank you for your answer.
The use-case I see is currently deployed ionic 1 apps that run in production at least for +1.5yr can be adapted to be run on the desktop.
Having this would be a great plus for all currently deployed ionic 1 apps.
Although I totally agree that new apps should follow the well-supported-trend the tech evolution follows.
@mluis Ahh - ok I'll give you that. I never thought of porting legacy projects.
Please check out the Ionic 1 branch and see if that works for you:
git clone https://github.com/paulsutherland/Polyonic.git
cd Polyonic
git checkout -b Ionic1
npm install
npm start
@paulsutherland thank you.
As I'm testing it and during npm install
something went wrong, it is during ionic build
.
Below is my log:
Testing binary
Binary is fine
> electron@1.7.9 postinstall /Users/*snip*/Polyonic/src/node_modules/electron
> node install.js
npm notice created a lockfile as package-lock.json. You should commit this file.
added 728 packages in 37.635s
> ionic integrations enable gulp
[OK] Added gulp integration!
Error: Cannot find module '/Users/*snip*/Polyonic/src/node_modules/@ionic/app-scripts'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at next (native)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:105:75
at Object.__awaiter (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:101:16)
at Object.importAppScripts (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
at /usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/build.js:10:48
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! polyonic@1.0.0 postinstall: `cd src && npm install && ionic build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the polyonic@1.0.0 postinstall 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/*snip*/.npm/_logs/2017-12-12T16_00_17_819Z-debug.log
And I think I know why. The new cordova CLI uses ionic cordova build
instead of ionic build
EDIT: it seems the error still persists on the newer ionic cli tool.
@mluis It looks like I made a mess of the commit. I have updated it now, so please try again:
git clone -b Ionic1 https://github.com/paulsutherland/Polyonic.git
cd Polyonic
npm install
npm start
I'm not getting it to work "out of the box".
Ok, this is what happens:
[OK] Added gulp integration!
[ERROR] Error with ./node_modules/@ionic/app-scripts/package.json file: FILE_NOT_FOUND
[ERROR] Error with ./node_modules/@ionic/app-scripts/package.json file: FILE_NOT_FOUND
Error: Cannot find module '/Users/*snip*/Polyonic/src/node_modules/@ionic/app-scripts'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at next (native)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:105:75
at Object.__awaiter (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:101:16)
at Object.importAppScripts (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
at /usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/build.js:10:48
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! polyonic@1.0.0 postinstall: `cd src && npm install && ionic build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the polyonic@1.0.0 postinstall 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/*snip*/.npm/_logs/2017-12-13T12_35_39_988Z-debug.log
then I installed ionic locally npm install ionic
and the error disappeared.
After that I had to npm install app-scripts
inside src/
and then on the Polyonic/
folder after npm install
I'm getting this:
*snip*/Polyonic]$ npm install
> polyonic@1.0.0 postinstall /Users/*snip*/Polyonic
> cd src && npm install && ionic build
up to date in 5.563s
Error: Cannot find module '/Users/*snip*/Polyonic/src/node_modules/@ionic/app-scripts'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/*snip*/Polyonic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at next (native)
at /Users/*snip*/Polyonic/node_modules/tslib/tslib.js:105:75
at Object.__awaiter (/Users/*snip*/Polyonic/node_modules/tslib/tslib.js:101:16)
at Object.importAppScripts (/Users/*snip*/Polyonic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
at /Users/*snip*/Polyonic/node_modules/@ionic/cli-utils/lib/ionic-angular/build.js:10:48
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! polyonic@1.0.0 postinstall: `cd src && npm install && ionic build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the polyonic@1.0.0 postinstall 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/*snip*/.npm/_logs/2017-12-13T12_43_05_087Z-debug.log
@mluis
Ok it looked like dependency issues in package.json.
Can you try again?
git clone -b Ionic1 https://github.com/paulsutherland/Polyonic.git
cd Polyonic
npm install
npm start
@paulsutherland thank you. It worked like a charm!
I'll begin on the integration and reporting of ionic v1 apps.
Best regards
@mluis Great news.
Good luck with the integration. If you have any queries, please don't hesitate to get in touch.
I plan on maintaining and working on this project in the new year. I am keenly watching Ionic 4 and will continue to update Polyonic with Ionic 4 and Stencil.
Cheers..
Paul
Does it supports ionic v1 ?
Any branch to support older projects?
BR