Skip to content
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

Does not work with plugin-typescript #12

Open
frederikschubert opened this issue Dec 2, 2016 · 20 comments
Open

Does not work with plugin-typescript #12

frederikschubert opened this issue Dec 2, 2016 · 20 comments

Comments

@frederikschubert
Copy link
Contributor

When trying to use plugin-typescript the chrome tab hangs with 100% CPU usage.

@alexisvincent
Copy link
Owner

Are you able to identify the problematic area?

@frederikschubert
Copy link
Contributor Author

It seems to hang at this request:

http://localhost:8000/node_modules/sha.js/index.js

@alexisvincent
Copy link
Owner

I get the same issue. What makes you think its that request?

@frederikschubert
Copy link
Contributor Author

I now disabled caching and the first request that stays in a pending state is http://localhost:8000/node_modules/inherits/inherits_browser.js.

@frederikschubert
Copy link
Contributor Author

This is really hard to debug, as the browser freezes as soon as I include plugin-typescript.

@alexisvincent
Copy link
Owner

Try with throttle

@alexisvincent
Copy link
Owner

Leaving to go home. Will check again there

@frederikschubert
Copy link
Contributor Author

Alright. I will try to debug it further tonight. I just noticed that the lock file still contains the urls to my company's proxy. :) So that will probably have to change.

@alexisvincent
Copy link
Owner

I just deleted it. Im going to try now with the jspm package override and see if that works

@alexisvincent
Copy link
Owner

This is failing for me as well. It might have something to do with overrides... If you want to manually apply overrides, just copy them out of the jspm registry and add them to the package.json of the packages before doing a config gen.

@frederikschubert
Copy link
Contributor Author

frederikschubert commented Dec 2, 2016

So I narrowed it down to jspm-nodelibs-buffer and/or jspm-nodelibs-string_decoder. I added the nodelibs one by one and when I added either one of these the error occured.
Without them, the application (obviously) does not run, but the browser does not freeze either.

Update

When I only load this file through systemjs, the browser freezes:

require('jspm-nodelibs-buffer');

Update 2

When I install the newest version of https://github.com/feross/buffer directly, the browser does not freeze anymore.

But now it hangs at:

require('jspm-nodelibs-string_decoder');

@alexisvincent
Copy link
Owner

Thanks for tracking this. I'll play with it in a bit. Did you install from github or npm?

@frederikschubert
Copy link
Contributor Author

I tried both. string_decoder depends on the global Buffer object. So maybe the buffer package still is the problem and my mapping did not work as intended.

@alexisvincent
Copy link
Owner

I'm doing some funky stuff with that. Look at the systemjs-nodelibs

@frederikschubert
Copy link
Contributor Author

I see. When installing systemjs-nodelibs I get some warnings from yarn/npm:

warning Unmet peer dependency "util@jspm-nodelibs-util@^0.2.0".
warning Unmet peer dependency "assert@jspm-nodelibs-assert@^0.2.0".
warning Unmet peer dependency "http@jspm-nodelibs-http@^0.2.0".
warning Unmet peer dependency "process@jspm-nodelibs-process@^0.2.0".
warning Unmet peer dependency "process@jspm-nodelibs-process@^0.2.0".

@alexisvincent
Copy link
Owner

Will check this out in an hour or so

@alexisvincent
Copy link
Owner

Sorry for the delay, busy weekend, with too little time.

The peer dependency issue is because JSPM internally uses a non standard npm package dep convention, since they assume that it will only be installed using JSPM. I want to try make this cleaner. Also now that you and Guy have pushed npm package updates, we can probably use those instead, which will speedup yarn installs since it doesn't need to resolve the github package every install.

@alexisvincent
Copy link
Owner

Any progress on the source of the bug?

@frederikschubert
Copy link
Contributor Author

No worries :) No, unfortunately I could not find it.

@alexisvincent
Copy link
Owner

I'll try play some more today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants