-
Notifications
You must be signed in to change notification settings - Fork 399
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
Use node:
-prefixed imports for Node.js core modules
#1803
Comments
Hey @mirror-kt, thanks for sharing your knowledge! Since bolt-js internally relies on a few modules that do not work on Cloudflare Workers or other similar platforms, which do not natively support Node.js runtime APIs. In particular, using axios for HTTP communications is a key blocker for it. Until axios and some other modules start supporting cf-workers, simply adding the prefix on this project's side does not help. With that being said, if this option proves valuable for a broader audience in the future, we may consider working on it. Thanks again for the suggestion! |
FWIW, if you are looking for a currently available solution to build Slack apps on Cloudflare Workers, my personal hobby project may be useful for you: https://github.com/seratch/slack-cloudflare-workers The project is still very young, but I've been actively working on it lately! |
The current major version of bolt supports all the way back to node 14. I am slowly working towards a new major version, which will drop node support prior to v18. It was hard to find information about when exactly |
Resolved in #2259 and released in bolt v4! |
FYI: nodejs/node#36098
The
node:
-prefix was introduced to avoid namespace conflicts when importing Node.js core modules.At this time, it does not affect the operation without prefixes, but since some modules, such as
node:test
, require prefixes, I suggest that you modify your entire codebase with prefixes while you are at it.Also, as a side effect of prefixing, you may be able to run bolt on Cloudflare Workers.
Cloudflare Workers has announced the availability of Node.js compatible APIs, but the
node:
-prefix is now required to use them.Details of how to run on Cloudflare Workers should be a separate issue, but this possibility is a great motivation to introduce prefixes.
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: