es4x
es4x copied to clipboard
Hello World Instructions don't work
Been a while since I tried es4x, so I went right to the Hello World example. Doesn't seem to work.
es4x hello-es4x.js
Installing JVMCI Compiler...
Installing GraalJS...
Missing node_modules/.bin/es4x-launcher.jar
more node_modules/es4x_install_successful
../.lib/es4x-0.14.0.jar
../.lib/vertx-core-4.0.0.jar
../.lib/netty-common-4.1.49.Final.jar
../.lib/netty-buffer-4.1.49.Final.jar
../.lib/netty-transport-4.1.49.Final.jar
../.lib/netty-handler-4.1.49.Final.jar
../.lib/netty-codec-4.1.49.Final.jar
../.lib/netty-handler-proxy-4.1.49.Final.jar
../.lib/netty-codec-socks-4.1.49.Final.jar
../.lib/netty-codec-http-4.1.49.Final.jar
../.lib/netty-codec-http2-4.1.49.Final.jar
../.lib/netty-resolver-4.1.49.Final.jar
../.lib/netty-resolver-dns-4.1.49.Final.jar
../.lib/netty-codec-dns-4.1.49.Final.jar
../.lib/jackson-core-2.11.3.jar
../.lib/js-20.3.0.jar
../.lib/chromeinspector-20.3.0.jar
../.lib/profiler-20.3.0.jar
../.lib/regex-20.3.0.jar
../.lib/truffle-api-20.3.0.jar
../.lib/graal-sdk-20.3.0.jar
../.lib/icu4j-67.1.jar
Hi @murphye! How did you manage to create the project, I just did this in a clean VM with stock OpenJDK11
~ $ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.10)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.10, mixed mode, sharing)
~ $ mkdir my-app
~ $ cd my-app/
~/my-app $ npm init @es4x project
npx: installed 1 in 4.248s
Missing node_modules/.bin/es4x-launcher.jar
~/my-app $ ls
index.js index.test.js package.json
~/my-app $ npm install
> [email protected] postinstall /home/paulo/my-app
> es4x install
Downloading: https://repo1.maven.org/maven2/io/reactiverse/es4x/0.14.0/es4x-0.14.0.pom
Downloaded: https://repo1.maven.org/maven2/io/reactiverse/es4x/0.14.0/es4x-0.14.0.pom (6 KB at 7.4 KB/sec)
Downloading: https://repo1.maven.org/maven2/io/reactiverse/es4x-parent/0.14.0/es4x-parent-0.14.0.pom
Downloaded: https://repo1.maven.org/maven2/io/reactiverse/es4x-parent/0.14.0/es4x-parent-0.14.0.pom (9 KB at 27.4 KB/sec)
Downloading: https://repo1.maven.org/maven2/io/vertx/vertx-unit/4.0.0/vertx-unit-4.0.0.pom
Downloaded: https://repo1.maven.org/maven2/io/vertx/vertx-unit/4.0.0/vertx-unit-4.0.0.pom (5 KB at 17.0 KB/sec)
Downloading: https://repo1.maven.org/maven2/io/vertx/vertx-dependencies/4.0.0/vertx-dependencies-4.0.0.pom
Downloaded: https://repo1.maven.org/maven2/io/vertx/vertx-dependencies/4.0.0/vertx-dependencies-4.0.0.pom (32 KB at 373.1 KB/sec)
Downloading: https://repo1.maven.org/maven2/io/vertx/vertx-core/4.0.0/vertx-core-4.0.0.pom
Downloaded: https://repo1.maven.org/maven2/io/vertx/vertx-core/4.0.0/vertx-core-4.0.0.pom (29 KB at 293.7 KB/sec)
Downloading: https://repo1.maven.org/maven2/io/reactiverse/es4x/0.14.0/es4x-0.14.0.jar
Downloading: https://repo1.maven.org/maven2/io/vertx/vertx-unit/4.0.0/vertx-unit-4.0.0.jar
Downloading: https://repo1.maven.org/maven2/io/vertx/vertx-core/4.0.0/vertx-core-4.0.0.jar
Downloaded: https://repo1.maven.org/maven2/io/reactiverse/es4x/0.14.0/es4x-0.14.0.jar (70 KB at 231.5 KB/sec)
Downloaded: https://repo1.maven.org/maven2/io/vertx/vertx-unit/4.0.0/vertx-unit-4.0.0.jar (97 KB at 276.8 KB/sec)
Downloaded: https://repo1.maven.org/maven2/io/vertx/vertx-core/4.0.0/vertx-core-4.0.0.jar (1318 KB at 2361.4 KB/sec)
Installing JVMCI Compiler...
Downloading: https://repo1.maven.org/maven2/org/graalvm/compiler/compiler/20.3.0/compiler-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/compiler/compiler/20.3.0/compiler-20.3.0.pom (2 KB at 16.4 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.3.0/graal-sdk-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.3.0/graal-sdk-20.3.0.pom (2 KB at 17.5 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.3.0/truffle-api-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.3.0/truffle-api-20.3.0.pom (2 KB at 15.8 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/compiler/compiler/20.3.0/compiler-20.3.0.jar
Downloading: https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.3.0/graal-sdk-20.3.0.jar
Downloading: https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.3.0/truffle-api-20.3.0.jar
Downloaded: https://repo1.maven.org/maven2/org/graalvm/sdk/graal-sdk/20.3.0/graal-sdk-20.3.0.jar (535 KB at 894.9 KB/sec)
Downloaded: https://repo1.maven.org/maven2/org/graalvm/truffle/truffle-api/20.3.0/truffle-api-20.3.0.jar (6913 KB at 4875.0 KB/sec)
Downloaded: https://repo1.maven.org/maven2/org/graalvm/compiler/compiler/20.3.0/compiler-20.3.0.jar (18905 KB at 10735.3 KB/sec)
Installing GraalJS...
Downloading: https://repo1.maven.org/maven2/org/graalvm/js/js/20.3.0/js-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/js/js/20.3.0/js-20.3.0.pom (2 KB at 26.6 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/tools/chromeinspector/20.3.0/chromeinspector-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/tools/chromeinspector/20.3.0/chromeinspector-20.3.0.pom (2 KB at 3.1 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/tools/profiler/20.3.0/profiler-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/tools/profiler/20.3.0/profiler-20.3.0.pom (2 KB at 2.7 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.3.0/regex-20.3.0.pom
Downloaded: https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.3.0/regex-20.3.0.pom (2 KB at 6.1 KB/sec)
Downloading: https://repo1.maven.org/maven2/com/ibm/icu/icu4j/67.1/icu4j-67.1.pom
Downloaded: https://repo1.maven.org/maven2/com/ibm/icu/icu4j/67.1/icu4j-67.1.pom (5 KB at 19.8 KB/sec)
Downloading: https://repo1.maven.org/maven2/org/graalvm/js/js/20.3.0/js-20.3.0.jar
Downloading: https://repo1.maven.org/maven2/org/graalvm/tools/chromeinspector/20.3.0/chromeinspector-20.3.0.jar
Downloading: https://repo1.maven.org/maven2/org/graalvm/tools/profiler/20.3.0/profiler-20.3.0.jar
Downloading: https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.3.0/regex-20.3.0.jar
Downloading: https://repo1.maven.org/maven2/com/ibm/icu/icu4j/67.1/icu4j-67.1.jar
Downloaded: https://repo1.maven.org/maven2/org/graalvm/tools/profiler/20.3.0/profiler-20.3.0.jar (374 KB at 362.0 KB/sec)
Downloaded: https://repo1.maven.org/maven2/org/graalvm/tools/chromeinspector/20.3.0/chromeinspector-20.3.0.jar (989 KB at 681.8 KB/sec)
Downloaded: https://repo1.maven.org/maven2/com/ibm/icu/icu4j/67.1/icu4j-67.1.jar (12800 KB at 8584.6 KB/sec)
Downloaded: https://repo1.maven.org/maven2/org/graalvm/js/js/20.3.0/js-20.3.0.jar (17029 KB at 8501.5 KB/sec)
Downloaded: https://repo1.maven.org/maven2/org/graalvm/regex/regex/20.3.0/regex-20.3.0.jar (2750 KB at 1050.6 KB/sec)
Skipping install (recent successful run)
npm notice created a lockfile as package-lock.json. You should commit this file.
added 3 packages from 1 contributor and audited 3 packages in 13.366s
found 0 vulnerabilities
~/my-app $ npm start
> [email protected] start /home/paulo/my-app
> es4x
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/paulo/my-app/node_modules/.lib/chromeinspector-20.3.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/paulo/my-app/node_modules/@es4x/create/slf4j-jdk14-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
Cannot install GraalVM MBean due to Receiver class org.graalvm.compiler.hotspot.management.HotSpotGraalManagement does not define or inherit an implementation of the resolved method 'abstract void initialize(org.graalvm.compiler.hotspot.HotSpotGraalRuntime, org.graalvm.compiler.hotspot.GraalHotSpotVMConfig)' of interface org.graalvm.compiler.hotspot.HotSpotGraalManagementRegistration.
Server started on port 3000
Succeeded in deploying verticle
^C
~/my-app $ ./node_modules/.bin/es4x
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/paulo/my-app/node_modules/.lib/chromeinspector-20.3.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/paulo/my-app/node_modules/@es4x/create/slf4j-jdk14-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
Cannot install GraalVM MBean due to Receiver class org.graalvm.compiler.hotspot.management.HotSpotGraalManagement does not define or inherit an implementation of the resolved method 'abstract void initialize(org.graalvm.compiler.hotspot.HotSpotGraalRuntime, org.graalvm.compiler.hotspot.GraalHotSpotVMConfig)' of interface org.graalvm.compiler.hotspot.HotSpotGraalManagementRegistration.
Server started on port 3000
Succeeded in deploying verticle
^C
Do you have es4x
installed as a global npm package? In this example, I'm pulling it as a local dependency that gets generated in the package.json
If you go to this page: https://reactiverse.io/es4x/get-started/hello-world.html#create-a-new-project
It implies that you can simply create a hello-es4x.js
and then run es4x hello-es4x.js
I'm also having issues getting the hello world project to work on Windows 10 after installing es4x globally using npm install -g @es4x/[email protected]
:
PS E:\dev\es4x\hello-world> es4x project
Missing node_modules\.bin\es4x-launcher.jar
PS E:\dev\es4x\hello-world> dir
Directory: E:\dev\es4x\hello-world
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/14/2021 11:46 AM 221 index.js
-a---- 9/14/2021 11:46 AM 266 index.test.js
-a---- 9/14/2021 11:46 AM 436 package.json
PS E:\dev\es4x\hello-world> npm install
> [email protected] postinstall E:\dev\es4x\hello-world
> es4x install
Missing node_modules\.bin\es4x-launcher.jar
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! [email protected] postinstall: `es4x install`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jamartin\AppData\Roaming\npm-cache\_logs\2021-09-14T18_46_43_409Z-debug.log
Uninstalled es4x 0.15.0 and tried npm install -g @es4x/create
, which installs es4x 0.14.0 - now the npm install command works, but start fails like so:
PS E:\dev\es4x\hello-world> es4x project
Missing node_modules\.bin\es4x-launcher.jar
PS E:\dev\es4x\hello-world> dir
Directory: E:\dev\es4x\hello-world
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/14/2021 12:06 PM 221 index.js
-a---- 9/14/2021 12:06 PM 266 index.test.js
-a---- 9/14/2021 12:06 PM 436 package.json
PS E:\dev\es4x\hello-world> npm install
> [email protected] postinstall E:\dev\es4x\hello-world
> es4x install
Installing JVMCI Compiler...
Installing GraalJS...
Skipping install (recent successful run)
npm notice created a lockfile as package-lock.json. You should commit this file.
added 3 packages from 1 contributor and audited 3 packages in 6.545s
found 0 vulnerabilities
PS E:\dev\es4x\hello-world> npm start
> [email protected] start E:\dev\es4x\hello-world
> es4x
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/E:/dev/es4x/hello-world/node_modules/.lib/chromeinspector-20.3.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/dev/es4x/hello-world/node_modules/@es4x/create/slf4j-jdk14-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
Failed in deploying verticle caused by ModuleError: Module "./index.js" was not found
at <js> Require.resolve(file:/E:/dev/es4x/hello-world/node_modules/.lib/es4x-0.14.0.jar!/io/reactiverse/es4x/jvm-npm.js:122:3628-3706)
at <js> runMain(file:/E:/dev/es4x/hello-world/node_modules/.lib/es4x-0.14.0.jar!/io/reactiverse/es4x/jvm-npm.js:80:2422-2442)
at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:550)
at io.reactiverse.es4x.impl.JSVerticleFactory$1.start(JSVerticleFactory.java:80)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:196)
at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96)
at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:59)
at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:40)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
I also cannot start with es4x due to Missing node_modules\.bin\es4x-launcher.jar
.
$ npm install -g @es4x/create
added 1 package, and audited 3 packages in 2s
found 0 vulnerabilities
$ es4x --help
Usage: es4x [COMMAND] [OPTIONS] [arg...]
Commands:
project/app Initializes the 'package.json' to work with ES4X.
install Installs required jars from maven to 'node_modules'.
security-policy Initializes a secure by default VM 'security.policy'.
versions Displays the versions.
Current VM:
Name: OpenJDK 64-Bit Server VM - 11.0.13
Vendor: GraalVM CE 21.3.0
Run 'es4x COMMAND --help' for more information on a command.
Missing node_modules\.bin\es4x-launcher.jar
node_modules
contains only es4x-cli.js
:
$ ls -la /C/Users/myuser/AppData/Roaming/nvm/v16.13.1/node_modules/@es4x/create/bin
total 8
drwxr-xr-x 1 WR14+localadmin 197121 0 dec 30 17:17 ./
drwxr-xr-x 1 WR14+localadmin 197121 0 dec 30 17:17 ../
-rwxr-xr-x 1 WR14+localadmin 197121 2139 dec 30 17:17 es4x-cli.js*
My environment:
$ es4x versions
VM: OpenJDK 64-Bit Server VM - 11.0.13
VM Vendor: GraalVM CE 21.3.0
ES4X: 0.14.0
graaljs: 20.3.0
Missing node_modules\.bin\es4x-launcher.jar
$ npm -v
8.1.2
$ node -v
v16.13.1
$ java -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment GraalVM CE 21.3.0 (build 11.0.13+7-jvmci-21.3-b05)
OpenJDK 64-Bit Server VM GraalVM CE 21.3.0 (build 11.0.13+7-jvmci-21.3-b05, mixed mode, sharing)
Any workaround?
I do see you have Unix like paths in your output. What are you using to install and launch the application? I assume it's not cmd
?
I also need to be fair and say that on windows i pretty much only tested CMD.
If you share what's your setup I'll try to get a dev VM to test that mode too.
From what I can tell, it must be a path issue translating from Windows to Unix somewhere.
I used GitBash, now switched to cmd
with the same observation.
My concern is that after @es4x/create
installation, es4x --help
ends with error Missing node_modules\.bin\es4x-launcher.jar
.
Cleanup: I uninstalled @es4x/create
and deleted remaining @es4x
directory.
c:\workspace\sandbox>npm uninstall -g @es4x/create
removed 1 package, and audited 2 packages in 37s
found 0 vulnerabilities
c:\workspace\sandbox>rmdir "c:/Users/myuser/AppData/Roaming/nvm/v16.13.1/node_modules/@es4x"
The content of cleaned installation dir:
c:\workspace\sandbox>dir "c:/Users/myuser/AppData/Roaming/nvm/v16.13.1"
Directory of c:\Users\myuser\AppData\Roaming\nvm\v16.13.1
02.01.2022 17:34 <DIR> .
02.01.2022 17:34 <DIR> ..
30.12.2021 17:15 59Â 385Â 480 node.exe
02.01.2022 17:05 <DIR> node_modules
30.12.2021 17:15 1Â 365 npm
30.12.2021 17:15 483 npm.cmd
30.12.2021 17:15 1Â 507 npx
30.12.2021 17:15 539 npx.cmd
c:\workspace\sandbox>dir "c:/Users/myuser/AppData/Roaming/nvm/v16.13.1/node_modules"
Directory of c:\Users\myuser\AppData\Roaming\nvm\v16.13.1\node_modules
02.01.2022 17:01 <DIR> .
02.01.2022 17:01 <DIR> ..
30.12.2021 17:15 <DIR> npm
Install @es4x/create
:
c:\workspace\sandbox>npm install -g @es4x/create
added 1 package, and audited 3 packages in 5s
found 0 vulnerabilities
Check the content of the installaton directory:
c:\workspace\sandbox>dir "c:/Users/myuser/AppData/Roaming/nvm/v16.13.1"
Directory of c:\Users\myuser\AppData\Roaming\nvm\v16.13.1
02.01.2022 17:05 <DIR> .
02.01.2022 17:05 <DIR> ..
02.01.2022 17:05 344 es4x
02.01.2022 17:05 343 es4x.cmd
02.01.2022 17:05 877 es4x.ps1
30.12.2021 17:15 59Â 385Â 480 node.exe
02.01.2022 17:05 <DIR> node_modules
30.12.2021 17:15 1Â 365 npm
30.12.2021 17:15 483 npm.cmd
30.12.2021 17:15 1Â 507 npx
30.12.2021 17:15 539 npx.cmd
8 File(s) 59Â 390Â 938 bytes
c:\workspace\sandbox>dir /S "c:/Users/myuser/AppData/Roaming/nvm/v16.13.1/node_modules/@es4x"
Directory of c:\Users\myuser\AppData\Roaming\nvm\v16.13.1\node_modules\@es4x
02.01.2022 17:05 <DIR> .
02.01.2022 17:05 <DIR> ..
02.01.2022 17:05 <DIR> create
0 File(s) 0 bytes
Directory of c:\Users\myuser\AppData\Roaming\nvm\v16.13.1\node_modules\@es4x\create
02.01.2022 17:05 <DIR> .
02.01.2022 17:05 <DIR> ..
02.01.2022 17:05 121Â 783 asm-9.0.jar
02.01.2022 17:05 <DIR> bin
02.01.2022 17:05 335Â 042 commons-codec-1.11.jar
02.01.2022 17:05 501Â 879 commons-lang3-3.8.1.jar
02.01.2022 17:05 118Â 778 es4x-pm-0.14.0.jar
02.01.2022 17:05 778Â 156 httpclient-4.5.12.jar
02.01.2022 17:05 328Â 593 httpcore-4.4.13.jar
02.01.2022 17:05 16Â 537 jcl-over-slf4j-1.7.30.jar
02.01.2022 17:05 11Â 357 LICENSE
02.01.2022 17:05 57Â 824 maven-artifact-3.6.3.jar
02.01.2022 17:05 14Â 262 maven-builder-support-3.6.3.jar
02.01.2022 17:05 215Â 412 maven-model-3.6.3.jar
02.01.2022 17:05 192Â 302 maven-model-builder-3.6.3.jar
02.01.2022 17:05 27Â 158 maven-repository-metadata-3.6.3.jar
02.01.2022 17:05 149Â 089 maven-resolver-api-1.6.1.jar
02.01.2022 17:05 45Â 724 maven-resolver-connector-basic-1.6.1.jar
02.01.2022 17:05 179Â 584 maven-resolver-impl-1.6.1.jar
02.01.2022 17:05 66Â 242 maven-resolver-provider-3.6.3.jar
02.01.2022 17:05 38Â 397 maven-resolver-spi-1.6.1.jar
02.01.2022 17:05 15Â 645 maven-resolver-transport-file-1.6.1.jar
02.01.2022 17:05 43Â 618 maven-resolver-transport-http-1.6.1.jar
02.01.2022 17:05 168Â 478 maven-resolver-util-1.6.1.jar
02.01.2022 17:05 288 package.json
02.01.2022 17:05 85Â 327 plexus-interpolation-1.25.jar
02.01.2022 17:05 261Â 801 plexus-utils-3.2.1.jar
02.01.2022 17:05 1Â 493 README.md
02.01.2022 17:05 41Â 472 slf4j-api-1.7.30.jar
02.01.2022 17:05 8Â 510 slf4j-jdk14-1.7.30.jar
27 File(s) 3Â 824Â 751 bytes
Directory of c:\Users\myuser\AppData\Roaming\nvm\v16.13.1\node_modules\@es4x\create\bin
02.01.2022 17:05 <DIR> .
02.01.2022 17:05 <DIR> ..
02.01.2022 17:05 2Â 139 es4x-cli.js
1 File(s) 2Â 139 bytes
Following the steps on https://reactiverse.io/es4x/get-started/install.html#project-tools, try to get help ends with error:
c:\workspace\sandbox>es4x --help
Usage: es4x [COMMAND] [OPTIONS] [arg...]
Commands:
project/app Initializes the 'package.json' to work with ES4X.
install Installs required jars from maven to 'node_modules'.
security-policy Initializes a secure by default VM 'security.policy'.
versions Displays the versions.
Current VM:
Name: OpenJDK 64-Bit Server VM - 11.0.13
Vendor: GraalVM CE 21.3.0
Run 'es4x COMMAND --help' for more information on a command.
Missing node_modules\.bin\es4x-launcher.jar
es4x-cli.js
wants to execute es4x-launcher.jar
but cannot find it.
C:\Users\myuser\AppData\Roaming\nvm\v16.13.1\node_modules\@es4x\create\bin\es4x-cli.js
:
...
let launcher = path.join('node_modules', '.bin', 'es4x-launcher.jar');
if (existsSync(path.join(process.cwd(), launcher))) {
argv.push(`${launcher}${path.delimiter}${path.join(__dirname, '..', pm)}`);
argv.push('io.reactiverse.es4x.ES4X');
const subProcess = spawn(java, argv.concat(process.argv.slice(2)), {
cwd: process.cwd(),
env: process.env,
stdio: 'inherit'
});
subProcess.on('error', (err) => {
console.error(`es4x ERROR: ${err}`);
process.exit(3);
});
subProcess.on('close', process.exit);
} else {
console.error(`Missing ${launcher}`);
process.exit(3);
}
Following the steps on https://github.com/reactiverse/es4x#usage, create of a new project ends with error:
c:\workspace\sandbox>mkdir es4x-hellow
c:\workspace\sandbox>cd es4x-hellow
c:\workspace\sandbox\es4x-hellow>npm init @es4x project
Missing node_modules\.bin\es4x-launcher.jar
npm ERR! code 3
npm ERR! path c:\workspace\sandbox\es4x-hellow
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c es4x "project"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myuser\AppData\Local\npm-cache\_logs\2022-01-02T16_53_12_344Z-debug.log
However, it creates some files:
Directory of c:\workspace\sandbox\es4x-hellow
02.01.2022 17:53 <DIR> .
02.01.2022 17:53 <DIR> ..
02.01.2022 17:53 221 index.js
02.01.2022 17:53 266 index.test.js
02.01.2022 17:53 436 package.json
Result of npm install
is also node_modules\.bin\es4x-launcher.jar
:
c:\workspace\sandbox\es4x-hellow>npm install
> [email protected] postinstall
> es4x install
Skipping install (recent successful run)
added 3 packages, and audited 4 packages in 3s
found 0 vulnerabilities
c:\workspace\sandbox\es4x-hellow>dir "node_modules/.bin"
Directory of c:\workspace\sandbox\es4x-hellow\node_modules\.bin
02.01.2022 17:58 <DIR> .
02.01.2022 17:58 <DIR> ..
02.01.2022 17:58 324 es4x
02.01.2022 17:58 728 es4x-launcher.cmd
02.01.2022 17:58 14Â 885 es4x-launcher.jar
02.01.2022 17:58 333 es4x.cmd
02.01.2022 17:58 837 es4x.ps1
Therefore, it is possible to get help now:
es4x --help
Usage: java io.reactiverse.es4x.ES4X [COMMAND] [OPTIONS] [arg...]
Commands:
bare Creates a bare instance of vert.x.
dockerfile Creates a generic Dockerfile for building and deploying
the current project.
install Installs required jars from maven to 'node_modules'.
jlink Creates a slim runtime (requires java >= 11).
list List vert.x applications
project Initializes the 'package.json' to work with ES4X.
run Runs a verticle called <main-verticle> in its own instance
of vert.x.
security-policy Initializes a secure by default VM 'security.policy'.
start Start a vert.x application in background
stop Stop a vert.x application
test Runs a Vert.x Unit test called <test-verticle> in its own
instance of vert.x.
version Displays the version.
versions Displays the versions.
vscode Launcher for vscode project.
webstorm Launcher for vscode project.
Run 'java io.reactiverse.es4x.ES4X COMMAND --help' for more information on a
command.
c:\workspace\sandbox\es4x-hellow>es4x versions
VM: OpenJDK 64-Bit Server VM - 11.0.13
VM Vendor: GraalVM CE 21.3.0
Vert.x: 4.0.0
ES4X: 0.14.0
graaljs: 20.3.0