-
Notifications
You must be signed in to change notification settings - Fork 7
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
[feat]: compatibility with Cloudflare Workers #61
Comments
It also occured on me. I created a new Vue or React frontend project, added
I went to some LLM chatbots and this solution work:
import { nodePolyfills } from 'vite-plugin-node-polyfills'
export default defineConfig({
plugins: [
nodePolyfills({
include: ['os', 'util', 'tty'],
globals: { Buffer: true}
}),
],
resolve: {
alias: {
'os': 'os-browserify/browser',
'util': 'util',
'tty': 'tty-browerify'
},
},
optimizeDeps: {
exclude: ['os-browserify', 'tty-browserify']
}
}) Now there are no errors and everything work. |
Hey, @emmanuelsw |
Hey there, thanks for reporting this issue. We're going to work on both this and #62 as soon as we can. |
A clear and concise description of what the feature is
Hello! I'm trying to use this library in an Astro project that I deploy on Cloudflare Pages, but I haven't been able to make it work. I followed Cloudflare's documentation to add polyfills for some Node APIs that were generating the error, but the Worker still throws this error:
[ERROR] Error: No such module \"node:tty\".\n imported from \"chunks/strapi-client_R71o50vs.mjs
Is there any plans to support the Cloudflare Workers runtime in the future?
Why should this feature be included?
It would increase the number of users who could use this library, in different contexts.
Please provide an example for how this would work
No response
The text was updated successfully, but these errors were encountered: