-
Notifications
You must be signed in to change notification settings - Fork 9
Unable to use CAPI on stackblitz or codesandbox #1129
Comments
Seems the specified Capi version in both of those is |
Then perhaps the docs should be updated? Because |
Perhaps in stackblitz it does. Doesn't on my machine. |
Also installing version
|
Seems to be an issue with how they are runnning browser code... A node project is able to install capi https://stackblitz.com/edit/stackblitz-starters-2u3qzv?file=index.js |
to install it, yes. To run it: no 🙁. Try importing anything from CAPI and running it (it uses node 16, so...) |
Looks like their browser setup doesn't correctly handle URL packages (which we use for codegen), and their node setup uses an old version of node. I don't see much we can do here 🤷 We'll eventually build a Capi playground (#1153) which should address some of these usecases. |
Hi @tjjfvi, I wanted to put forward a suggestion regarding the issue at hand. It would be beneficial to leave the issue open until a viable alternative or solution is identified. In my opinion, keeping it open would be advantageous because the ability to quickly demonstrate issues or features in the browser holds immense value. My concern is that a CAPI playground might not adequately address the needs of the majority of use cases. For example, it might not be suitable for demonstrating node project setups, parcel project setups, vitejs setups, and more. With that in mind, I kindly request that you reconsider reopening this issue and collaborate on devising an action plan for bundling CAPI in a manner that truly serves the community's needs. While a CAPI playground is a nice addition, it is crucial to address this urgent matter as I previously explained. The CAPI playground falls short in meeting the requirements of the majority of use cases, and as far as I am aware, there hasn't been significant interest expressed by anyone other than CAPI team members. Thank you for considering this suggestion, and I look forward to working together to find the best solution. |
I'm not sure there's anything we can do to fix this, but I'll still reopen it to track the status. (Perhaps stackblitz will soon update their version of Node and unblock this.) |
Could you please also look into why it doesn't work on codesandbox? 🙏 Also, the issue with stackblitz goes beyond node, as it can not be used on regular TS/JS projects, either. So, IMO that can (and IMO should) be fixed as it has to do with the way that the library is being packaged. |
Try creating a TS sandbox from scratch, then install capi and then try to reproduce the code reported in this issue (which I wanted to illustrate with a codesandbox/stackblitz, but wasn't able to 😞)... The result is this. There are at least 2 problems in there:
|
DEMO on a TS project
DEMO on a JS project
The text was updated successfully, but these errors were encountered: