Updated and broken


#1

Here what happened updating a working project to the latest framework.
I also tried to change to ionic-angular, but didn’t went better.

There is no more the file ionic.d.ts, and this broke everything …

 ✗ app\theme\app.ios.scss
Error: File to import not found or unreadable: ionic.ios
       Parent style sheet: stdin
        on line 19 of stdin
>> @import "ionic.ios";
   ^

√ Sass compilation complete

./app/app.js
Module not found: Error: Cannot resolve module 'ionic-framework/ionic' in C:\Temp\js\FirstAid\FirstAid\app
resolve module ionic-framework/ionic in C:\Temp\js\FirstAid\FirstAid\app
  looking for modules in app
    app/ionic-framework doesn't exist (module as directory)
  looking for modules in C:\Temp\js\FirstAid\FirstAid\node_modules
    C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework doesn't exist (module as directory)
[app/ionic-framework]
[C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework]
 @ ./app/app.js 10:14-46,./app/pages/getting-started/getting-started.js
Module not found: Error: Cannot resolve module 'ionic-framework/ionic' in C:\Temp\js\FirstAid\FirstAid\app\pages\getting-started
resolve module ionic-framework/ionic in C:\Temp\js\FirstAid\FirstAid\app\pages\getting-started
  looking for modules in app
    app/ionic-framework doesn't exist (module as directory)
  looking for modules in C:\Temp\js\FirstAid\FirstAid\node_modules
    C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework doesn't exist (module as directory)
[app/ionic-framework]
[C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework]
 @ ./app/pages/getting-started/getting-started.js 10:14-46,./app/pages/list/list.js
Module not found: Error: Cannot resolve module 'ionic-framework/ionic' in C:\Temp\js\FirstAid\FirstAid\app\pages\list
resolve module ionic-framework/ionic in C:\Temp\js\FirstAid\FirstAid\app\pages\list
  looking for modules in app
    app/ionic-framework doesn't exist (module as directory)
  looking for modules in C:\Temp\js\FirstAid\FirstAid\node_modules
    C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework doesn't exist (module as directory)
[app/ionic-framework]
[C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework]
 @ ./app/pages/list/list.js 10:14-46,./app/pages/grid/grid.js
Module not found: Error: Cannot resolve module 'ionic-framework/ionic' in C:\Temp\js\FirstAid\FirstAid\app\pages\grid
resolve module ionic-framework/ionic in C:\Temp\js\FirstAid\FirstAid\app\pages\grid
  looking for modules in app
    app/ionic-framework doesn't exist (module as directory)
  looking for modules in C:\Temp\js\FirstAid\FirstAid\node_modules
    C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework doesn't exist (module as directory)
[app/ionic-framework]
[C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework]
 @ ./app/pages/grid/grid.js 10:14-46,./app/pages/tree-node/tree-node.js
Module not found: Error: Cannot resolve module 'ionic-framework/ionic' in C:\Temp\js\FirstAid\FirstAid\app\pages\tree-node
resolve module ionic-framework/ionic in C:\Temp\js\FirstAid\FirstAid\app\pages\tree-node
  looking for modules in app
    app/ionic-framework doesn't exist (module as directory)
  looking for modules in C:\Temp\js\FirstAid\FirstAid\node_modules
    C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework doesn't exist (module as directory)
[app/ionic-framework]
[C:\Temp\js\FirstAid\FirstAid\node_modules\ionic-framework]
 @ ./app/pages/tree-node/tree-node.js 10:14-46 (CLI v2.0.0-beta.19)

Please just tell me how long should we wait before a reasonably stable version … it’s at least the fourth time we build the project from scratch and is terribly annoying and useless.

Thanks


#2

Hey there! Sorry you’re having trouble with the upgrade.

So from the error, it looks you’re trying to load things from ionic-framework, but the module has been changed to ionic-angular

https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#breaking-changes

You might also want to upgrade your beta cli, your webpack.config, ionic.config.js, package.json and include the new gulpfile.js

There are a few more structural changes coming up

All of these changes should allow for a much easier build process.


#3

Yes, this is because I tried to migrate the ionic-framework to ionic-angular because of the (same) problem.

From the link you posted me, there is no clear upgrade-path to the latest tools/framework.
So I tried to create a new project from scratch following the ionic2-app-base instructions (using related latest versions).
I could create a (typescript based) project and it works, but as soon as i switch to “es6” in order to use the typescript Promise object, it screws everything again.

How can I use “es6” without breaking everything?

Thanks


#4

What do you mean here? Is it that same error? Could you give me an example of what you’re trying to do?


#5

I created a brand new project with the ionic2-app-base instructions, adding --ts in order to use Typescript.
Then I just switched to ES6.
This is the build log (Visual Studio Cordova Update 7 Taco Tools):

1>------ Rebuild All started: Project: ZapAll, Configuration: Debug Windows-x86 ------
1>  ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
1>  JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
1>  :clean UP-TO-DATE
1>  :CordovaLib:clean UP-TO-DATE
1>
1>  BUILD SUCCESSFUL
1>
1>  Total time: 5.6 secs
1>  Picked up _JAVA_OPTIONS: -Xmx512M
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(3841,14): error TS2300: Build: Duplicate identifier 'PropertyKey'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4061,5): error TS2300: Build: Duplicate identifier 'EPSILON'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4096,5): error TS2300: Build: Duplicate identifier 'MAX_SAFE_INTEGER'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4103,5): error TS2300: Build: Duplicate identifier 'MIN_SAFE_INTEGER'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4389,5): error TS2300: Build: Duplicate identifier 'done'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4390,5): error TS2300: Build: Duplicate identifier 'value'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4619,5): error TS2300: Build: Duplicate identifier 'flags'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4647,5): error TS2300: Build: Duplicate identifier 'size'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4657,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4674,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4686,5): error TS2300: Build: Duplicate identifier 'size'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4696,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(4712,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7\lib.es6.d.ts(5099,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Temp\js\ZapAll\ZapAll\platforms\Windows-x86\assets\www\typings\browser.d.ts(1,1): error TS6053: Build: File 'C:/Temp/js/ZapAll/ZapAll/platforms/Windows-x86/assets/www/typings/browser/ambient/es6-shim/es6-shim.d.ts' not found.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(8,14): error TS2300: Build: Duplicate identifier 'PropertyKey'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(11,5): error TS2300: Build: Duplicate identifier 'done'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(12,5): error TS2300: Build: Duplicate identifier 'value'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(250,5): error TS2300: Build: Duplicate identifier 'EPSILON'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(285,5): error TS2300: Build: Duplicate identifier 'MAX_SAFE_INTEGER'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(292,5): error TS2300: Build: Duplicate identifier 'MIN_SAFE_INTEGER'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(348,5): error TS2300: Build: Duplicate identifier 'flags'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(500,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(563,5): error TS2300: Build: Duplicate identifier 'size'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(572,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(583,5): error TS2300: Build: Duplicate identifier 'size'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(592,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(607,5): error TS2300: Build: Duplicate identifier 'prototype'.
1>C:\Temp\js\ZapAll\ZapAll\typings\browser\ambient\es6-shim\es6-shim.d.ts(621,5): error TS2300: Build: Duplicate identifier 'prototype'.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Do you have a different result on your end?

Thanks


#6

Ok, but what do you mean you “switched to es6” ? Did you write code differently? Also, what command are you using that generates this log?


#7

having the same issues…seems like beta.22 is broken if you dont use typescript option…