-
Notifications
You must be signed in to change notification settings - Fork 115
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
Unable to import modules #805
Comments
Hi @DoisKoh, thanks for opening the issue! Mind you sharing a bit more details about your development environment?
Thanks for mentioning; we changed some things yesterday in our CI and were fixing the failing test cases. This can happen on a |
It's a TypeScript Svelte Kit app (Vite).
Sorry, I realize I posted the error in the community forum but not here. This happens both in my much more complicated project, and just a vanilla Svelte Kit app:
Attempting to import |
Thanks a lot for sharing your setup! I will have a look and see what's going on there. Reading the error message, it could also be that's a configuration issue in the vite setup (e.g. sveltejs/kit#2161) |
The issue in general is simple, the importer thinks we're not in a module, but is using the module file as a source. The whole import/require thing has always been a big development pain. I wonder if the issue here is that we're not shipping the package.json in the distribution. Because it's what contains the information where to point import statements and require statements to our library. |
As an experiment @DoisKoh, you could try manually pasting in the package.json file in the corresponding node_modules folder, AFTER running |
Sorry, which package.json file from where to where? There's already a package.json file in the
Copying the package.json down into |
Hi, I'm facing the same problem as well. |
@vsgoulart I remember we saw similar problems and updated our FEEL libraries to mitigate that. Do you have more insights? |
@lamweili can you share your project setup as well? Especially your Typescript config. This helps to reproduce. |
We will likely need to add In any case you should make sure to use form-js in Client side components as we use browser functionality. Cf. to this example project. |
@DoisKoh @lamweili did you try to add In case you need further assistance, please provide more details about your setup, e.g. sharing a link to an example project. I'm closing this one for the time being; feel free to re-open. We are considering adding the |
Hello, I've confirmed that as of the latest version I can import it. I'm getting some weird styling but I guess that's a separate issue I'll have to figure out. Thanks! |
Describe the Bug
I’m getting import errors with my vite / typescript project. I also notice that the project was just updated yesterday and it’s currently failing CI checks. I’m just checking if this is already a known issue.
Steps to Reproduce
npm install @bpmn-io/form-js-viewer
or
npm install @bpmn-io/form-js
Follow the instructions from the README.md to import the modules:
https://github.com/bpmn-io/form-js
Simply importing fails:
Expected Behavior
I can import the
form-js
modules.Environment
The text was updated successfully, but these errors were encountered: