Hey you should probably update your library #24
Conversation
|
Support for the optional This package is widely depended-upon and currently supports Node.js 8 onwards. Line 38 in db8ea62 There is no mention of If this is something that is genuinely required then perhaps we could support a fallback, where the |
| @@ -1,5 +1,7 @@ | |||
| # detect-libc | |||
|
|
|||
| **IF YOU ARE READING THIS, YES. THIS ONE IS THE ONE THAT FIXES THE CLOUDFLARE ISSUE. HAVE FUN TESTING IN DEV!** | |||
| { | ||
| "name": "detect-libc", | ||
| "version": "2.0.3", | ||
| "name": "@ameerarsala/detect-libc", |
| "repository": { | ||
| "type": "git", | ||
| "url": "git://github.com/lovell/detect-libc" | ||
| "url": "git://github.com/AmeerArsala/detect-libc" |
| "name": "detect-libc", | ||
| "version": "2.0.3", | ||
| "name": "@ameerarsala/detect-libc", | ||
| "version": "2.0.4-0", |
| "musl" | ||
| ], | ||
| "author": "Lovell Fuller <npm@lovell.info>", | ||
| "author": "Ameer Arsala <ameer.arsala03@gmail.com>", |
|
Yes I'll make those changes! My bad I just needed to get an app working as quickly as possible so i had to publish a fork on npm. Basically, if you want to use certain Node libraries with Cloudflare workers that depend on this package, it won't work. The reason is that Cloudflare workers and all products based off of that (including pages) do not run Node and instead run a stripped-down version of Node called |
Are you able to share more details about which library/ies you are attempting to use? I ask as many native modules use this package and, even with the proposed changes, may still be unsupported by Cloudflare Workers. |
|
Oh I already tried it and it worked. Libraries like LibSQL and Sharp depend on it |
|
In terms of Sharp and "it worked", are you talking about Cloudflare Pages or Workers? I ask as the former provides a complete Node.js environment and is known to work already (without the proposed change), the latter uses V8 isolates and is known to not work due to a lack of Web Worker support. |
|
I'm talking about both, though this may not apply to Pages in prod/staging (it DOES apply in dev when running with the cloudflare runtime locally). It is for sure a thing with workers though. |
|
I've created #25 to track future possible improvements. Thanks for taking the time to open this PR and start the discussion. I'll close this PR for now but would be very happy to accept an updated PR that more closely matches what it proposes, if you're able. |
node:is now the standard and cloudflare test deployments on linux dont work without this