Comments (3)
Here is an example created from Deven Phillips tutorials.
https://github.com/iskane/es4x-example/blob/main/intro-to-vertx-master.zip
Configuration : graalvm-ce-java17-22.3.0 / es4x
"mvn clean compile vertx:run " and i have the following error:
Starting vert.x application...
[INFO] 10e265dd-ad24-48ba-a93d-12361380b92b-redeploy
[INFO] Failed in deploying verticle caused by ModuleError: Module "META-INF/resources/webjars/lodash/4.17.15/lodash.js" was not found
[INFO] at Require.resolve(.....m2\repository\io\reactiverse\es4x\0.19.1\es4x-0.19.1.jar!\io\reactiverse\es4x\jvm-npm.js:122:3628-3706)
[INFO] at Require(.....m2\repository\io\reactiverse\es4x\0.19.1\es4x-0.19.1.jar!\io\reactiverse\es4x\jvm-npm.js:89:2669-2695)
[INFO] at this.require(.....m2\repository\io\reactiverse\es4x\0.19.1\es4x-0.19.1.jar!\io\reactiverse\es4x\jvm-npm.js:46:1459-1475)
[INFO] at :anonymous(/C:/Users/iskan/IdeaProjects/intro-to-vertx-master/Hello.js:1:75-136)
[INFO] at _load(.....m2\repository\io\reactiverse\es4x\0.19.1\es4x-0.19.1.jar!\io\reactiverse\es4x\jvm-npm.js:73:2195-2276)
[INFO] at runMain(.....m2\repository\io\reactiverse\es4x\0.19.1\es4x-0.19.1.jar!\io\reactiverse\es4x\jvm-npm.js:85:2567-2611)
[INFO] at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:973)
Thank you.
from es4x.
This should definitely be possible as currently the require function use vert.x file system to resolve resources. Because of this, we should see jar resources as if they were local file system files.
Can you share a dummy jar/zip with the right location of the module you're trying to load and the require statement so I can debug if there's a specific issue with the setup?
I also see from your slashes you're probably on Windows, while I think this isn't an issue anymore it could be that with all the windows fixes in the last iterations we may have missed some edge cases...
from es4x.
Hello,
I managed to make it work in this example project with the javaScript files in the same jar we used in our production project.
However, it does not work in our real project.
The only difference is that in the example we have one module and in the real project we have several modules and we import the module with the JS into another module.
It would be great to have documentation of how to migrate from Vertx 3 + vertx-lang-js to vertx 4 + es4X.
When I look at the documentation that exists, I have the impression that ES4X is designed to create a separate npm project and in our case, we have JS verticals deployed from a java maven project.
Thank you.
from es4x.
Related Issues (20)
- Type coercion problem in global setTimer HOT 1
- Include js verticles in Java code HOT 5
- Multiple verticle instances generate bad context exceptions from graalvm when loading modules from common npm packages HOT 1
- Require statements fail to resolve json files from dependency except by relative path
- Limitations of es4x? HOT 6
- Problem using await HOT 3
- invokeMember (then) on io.vertx.core.impl.future.PromiseImpl@47ddaaf5 failed due to: Arity error - expected: 2 actual: 1 HOT 1
- Promise of vertx cannot call then twice or more. HOT 4
- Cannot Resolve the CWD error when path contains spaces in windows HOT 1
- Native libraries HOT 3
- About the difference between JSVerticleFactory and MJSVerticleFactory
- Make a new release with the latest graal and vert.x HOT 1
- How to use handlebars in es4x? HOT 2
- PR: Tracking progress for later alignment with web-modules. HOT 2
- [Question] How to build a file for java graaljs? HOT 1
- mongo-client:Multi threaded access requested by thread Thread[] but is not allowed for language(s) js HOT 2
- Release Vertx 4.4.0 npm modules HOT 3
- GraalVM 21 not recognized HOT 4
- About Native Images for ES4X
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from es4x.