-
Notifications
You must be signed in to change notification settings - Fork 231
Can not use latest version (1.0.5) with angular 2 setup #248
Comments
The issue is that if you include 1.0.5 in a non-angular project and remove @types/corejs you get errors on build. So I am not convinced that the 100% correct answer is to remove it as a dependency. I'll take a look at this a little deeper but seems to be caused by decisions made in the angular project. |
Turns out I can't duplicate this. I followed the steps in the article you linked and create a project with all the files, npm install, ran it and everything worked (I could look at the web page with the logo). Then I
Updated the app.component.ts and app.component.html to put a random string on the page using the pnp.util.getRandomString method. webpack bundle auto updated with file save and the page refreshed showing my string. Was also able to build using I am using npm version 3.10.8 if that has any effect. |
@okaufmann - were you able to retest this or provide any additional details? If not I'll be closing this as unable to reproduce. Thanks! |
Going to close this as unable to reproduce, please do reopen if you can provide additional details. Thanks! |
I'm getting this error too after upgrading from 1.0.4 to 1.0.6. Will investigate more and come back Edit |
I'll go ahead and reopen this, but if someone could please give me the additional steps to duplicate it? I followed what was in the article linked above and did not have issues. Are you installing other libraries? What specific actions are you taking with the library? What changes have you made to the default angular project as outlined in the article? |
Just an update, still researching. I've removed core-js locally for myself and added es6-promise but an stuck on fetch typings file referencing es6 types when it isn't needed, as discussed here. So hoping that gets resolved and unblocks us. I don't really want to add a shim file to cover those types but might have to as a stop gap. That being said, I still haven't been able to duplicate the above issue so somewhat guessing this will help. |
I just found out that there was the following config section present in our tsconfig.js but not in the angular-webpack-tutorial ones:
When this was removed, it works. (This was introduced by typescript 2.0) Can you proof this @Abrissirba ? |
Same for me, when I removed the "lib" property from tsconfig the errors disappears :) Do you have any more information/links about why is this is happening in typescript 2.0 @oka-garaio? |
The This then cause the dublicate type definitions. Discussion in the Typescript repo: microsoft/TypeScript#6974 As this is no pnp-js-core bug, this issue can be closed. |
Category
[ ] Enhancement
[x] Bug
[ ] Question
Expected / Desired Behavior / Question
If I use pnp-js-core in my angular 2 app (where core-js is a dependency) i can't compile the latest version 1.0.5 anymore. 1.0.4 works if I add typings for
microsoft.ajax
andwhatwg-fetch
additionally.There are several hints that @typings/core-js causes the problem and should be removed:
angular/angular-cli#1908
angular/angular-cli#2106
Observed Behavior
Steps to Reproduce
The text was updated successfully, but these errors were encountered: