-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it breaks webpack compilation with angular 6 #128
Comments
after debugging, i discover that the webpack configuration of the new angular is different in how it mocks nodejs core modules. restoring the following snippet in
|
see angular/angular-cli#9827 (comment) EDIT: the issue is caused by this line: https://github.com/stellar/js-stellar-base/blob/master/src/transaction.js#L10 |
Strange move from Angular to remove shims for Node modules. I think we should be able to remove Right now, can you try using bower-js-stellar-sdk in Angular context? |
@bartekn importing from import { Transaction, Keypair, xdr, Network } from 'stellar-sdk/dist/stellar-sdk' i can't test the application yet because there is another package that is breaking it, that is |
@bartekn after debugging further, the solution was restoring the nodejs shims in the webpack configuration.. i will eventually test the bower build the next week but the optimal solution would be to remove any nodejs-specific dependency instead of relying on the webpack build: what if i want to use |
@bartekn still having the same issue as @phra Using the @types suggest in Add a .d.ts file so Typescript users can easily use this library as well. #132 Returns Ultimately trying to avoid overriding core angular files or using ng Eject for custom webpack config, a fix would be greatly appreciated. Using Angular 6 and Typescript 2.7.2 |
@mrtpain you have to manually patch your EDIT: in order to patch in a reproducible way your |
Angular webpack issue - I have facing this error from 1 week - could anyone support me why this error comes in picture Runnpm run webpack-dev-server --inline --progress --port 8080 Console Error
Package.json/tsconfig.json
Please share if anyone resolve this issue awaiting... |
Only load `eventsource, which uses node built-ins `http` and `https`, in Node. Fixes an issue with Angular 6. See stellar/js-stellar-base#128.
With the release of |
I think this should be solved already, but im still getting error trying to import stellar-sdk into an Angular 8 Project. Dont know if this is the right place to ask about it, but I've tried stack overflow and cant get someone to answer and I really need to use it, so here its goes. Im getting the following error: Error
CodeIm just trying to use stellar in an Angular projetc. This is my app.component.ts:
Software versionsThese are the versions in using: |
@rafucisneros could you create a simple boilerplate project with the error and push it somewhere on GitHub? That could would help us debug this issue more easily :) |
Tried to reproduce the problem with a brand new Angular 8 project and everything is just fine. I updated my ionic project to use Angular 8 (I realized it was using angular 7) and everything is working right. Sorry for the disturbance and thanks for the help! |
Hi! It's me again! Still trying to integrate Stellar with Ionic 4.
If I comment the line where I use stellar, build runs successfully:
I pushed it into a repo: Not sure if its an issue you can solve, or if it is Ionic's team task. |
I have created a project from scratch and trying to resolve your first issue related to
Software versionsAngular CLI: 8.1.0 |
I got no problem with Angular. I just created an app to test it. try updating everything. |
You were right. Building doesnt work either with Angular. I had just tried ng serve which does work. |
Hi @rafucisneros @amitesh786, did you guys manage to solve the problem? perhaps a workaround? I'm currently facing the exact same problem 🤔 . |
Negative. I moved to React in which it does works. |
Nope 😢 and I agree with @rafucisneros |
Please provide additional details if you're still seeing this, a minimal reproduction project would be helpful. This is a closed issue, without more information there's nothing anyone can do. |
Hi @vcarl, this is the minimal reproduction project. This is how it was done:
Then modify the
And finally run the project yields the error:
Angular version:
|
ISSUE UPDATE:
We (Stellar.org) found a fix, and it'll go live in the next release of
stellar-base
andstellar-sdk
, either next Monday or the following one.i'm not able to complete the migration from angular 5 to 6 of my web application because of stellar-base trying to import nodejs core modules.
steps to reproduce the issue:
and update
app.component.ts
like this:and then:
npx ng serve
ps: with angular v5 it works.
The text was updated successfully, but these errors were encountered: