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

punycode depreciation #5

Open
britkat1980 opened this issue Oct 1, 2024 · 6 comments
Open

punycode depreciation #5

britkat1980 opened this issue Oct 1, 2024 · 6 comments

Comments

@britkat1980
Copy link

v3 of GivTCP uses Alpine3.19 and is now giving a depreciation warning for punycode module:

(node:63) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
@DanielGallo
Copy link
Owner

DanielGallo commented Oct 1, 2024

@britkat1980 - I've made this pull request: britkat1980/giv_tcp#259. This is to replace the serve npm module with http-server (to resolve the punycode error).

I also fixed the WebDashboard submodule - it was pointing to an outdated/nonexistent commit, causing it to render a really old version of the web dashboard.

I did a test build of GivTCP image locally, and the web dashboard renders with http-server but I couldn't fully test this - ports 6345, 6346, etc. for the inverter data aren't exposed by default. I also had to add port 3000 as being exposed so I could reach the web dashboard. Perhaps you can fully test it on your end?

@britkat1980
Copy link
Author

Thanks, that's working, but I get a different depreciation error:

(node:63) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use node --trace-deprecation ... to show where the warning was created)

There's couple of tweaks needed to work with GivTCP v3, but I'll create a PR back with that shortly.

@willholley
Copy link

Is there any need to use node at runtime at all? If nginx can be used to serve the static site instead that removes the need to have node/npm in the runtime image completely and knocks a few hundred MB off the size.

I knocked up a quick prototype locally - happy to PR if there's interest.

@britkat1980
Copy link
Author

Always happy to slim down the image size. Send a PR over on the GivTCP repo

@DanielGallo
Copy link
Owner

The dashboard just needs something simple to render the static web content. @willholley your approach sounds good. Thanks!

@willholley
Copy link

Great - I filed a PR at britkat1980/giv_tcp#283

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

3 participants