Skip to content
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

Archetype default configuration issue #222

Open
jiakuan opened this issue Jul 2, 2023 · 1 comment
Open

Archetype default configuration issue #222

jiakuan opened this issue Jul 2, 2023 · 1 comment

Comments

@jiakuan
Copy link
Contributor

jiakuan commented Jul 2, 2023

I used the following two commands to generate a new Hello project:

mvn org.apache.maven.plugins:maven-dependency-plugin:get \
-DrepoUrl=https://repo.vertispan.com/j2cl/ \
-Dartifact=com.vertispan.j2cl.archetypes:j2cl-archetype-simple:0.20

and

mvn archetype:generate -DarchetypeGroupId=com.vertispan.j2cl.archetypes \
-DarchetypeArtifactId=j2cl-archetype-simple \
-DarchetypeVersion=0.20

And then I ran the project using:

mvn j2cl:build
mvn jetty:run

After I opened http://localhost:8080, I got this error from browser console:

caught TypeError: Cannot read properties of null (reading 'appendChild')
    at w (hello.js:7:875)
    at hello.js:7:912

I guessed the default .native.js provided had some issues?

@treblereel
Copy link
Collaborator

@jiakuan thanks for your report. We should fix it ...
The problem is: js loads before body is created, to fix you can modify html like this:

    <script language='javascript' src='application.js' defer></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants