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

Wrong version of npm module "debug" added to bundle due to "node process" #494

Closed
bitflower opened this issue Feb 7, 2018 · 13 comments
Closed
Assignees

Comments

@bitflower
Copy link
Contributor

Bug repo:
https://github.com/bitflower/stencil-debug-problem

Current behavior:
See repo: importing "debug" doesn't work. I guess to to the fact that the Stencil compiler runs "on the server" (=node/terminal) and the debug module returns the node.js insetad of the browser.js because of that.

Expected behavior:
We can use "debug".

Steps to reproduce:
See repo

@jthoms1
Copy link
Contributor

jthoms1 commented Feb 16, 2018

Could you please update stencil to the latest release? npm install @stencil/core@latest I believe this was fixed in 0.3.0

@jthoms1 jthoms1 closed this as completed Feb 21, 2018
@bitflower
Copy link
Contributor Author

Hey guys, sorry for being late to the party.

I'm on Stencil 0.4.3 (can't go higher to 0.6.x right now).

But anyway it is not fixed:
bildschirmfoto 2018-02-23 um 16 04 53

Chrome is trying to access process.stderr.fd....

Re-open or new issue?

Sorry for the inconvenience!

@jthoms1
Copy link
Contributor

jthoms1 commented Feb 26, 2018

I pulled down your repo and updated to the latest stencil. Then changed the debug import to as follows.

import debug from 'debug';

The issue appears to be fixed no build or runtime error.

@bitflower
Copy link
Contributor Author

bitflower commented Mar 2, 2018

Hey @jthoms1, thanks for the continuous support (that said upfront ;-) ).
I work on different things and therefore always might need some time to get back..

Anyway, I had a closer look to the problem again and I created the error scenario in the repo. The repo is now on the latest Stencil version If you might want to have a look that would be awesome!

Repo: bitflower/stencil-debug-problem

Still gives me this:
bildschirmfoto 2018-03-02 um 12 38 23

Would love to se this re-opened.

Let me know if I can provide anything else!

Node: 8.9.4
OS: macOS 10.13.3

EDIT:
Browser: Chrome 64

@bitflower
Copy link
Contributor Author

Updated the repo to Stencil 0.7.0....

Problem persists :-(

@kirillgroshkov
Copy link

Same here. Going same path as @bitflower :)

@bitflower
Copy link
Contributor Author

Hey @jthoms1 I have created a (private) repo for #618 which also showcases this issue.

I have added you to the collaborators! Hope it helps!

Repo:
https://github.com/bitflower/caseos-ui/tree/data_component

@bitflower
Copy link
Contributor Author

Had the tiny hope of this being fixed after #618 is working now :-)

Do you need something else I can provide?

@bitflower
Copy link
Contributor Author

Hey guys, this keeps popping up everytime I add a module using debug (just today). How come nobody else has this!? Is it my setup? Hm ...

@jthoms1
Copy link
Contributor

jthoms1 commented Apr 2, 2018

@bitflower I will spend some extra time on this today. Hopefully I can find you a solution.

@jthoms1
Copy link
Contributor

jthoms1 commented Apr 2, 2018

It appears that there is a merged PR in debug that should fix this issue, but it has not been released yet. debug-js/debug#507

@jthoms1 jthoms1 added blocked and removed bug labels Apr 2, 2018
@jthoms1
Copy link
Contributor

jthoms1 commented Apr 2, 2018

I am going to close this issue because it should be fixed in the next release of debug.

@jthoms1 jthoms1 closed this as completed Apr 2, 2018
@bitflower
Copy link
Contributor Author

Hey @jthoms1! Great news, thanks a bunch! Am working around this in the meantime....

Wow, debug has kinda a slow release intervals compared to @Stencil LOL

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

4 participants