Closed TopherJan closed 5 months ago
Hi @TopherJan Could you please try this steps to see if there are any errors since the logs from maven shows nothing
$ cd js/
$ pnpm install --prefer-offline --frozen-lockfile --ignore-scripts
We'll need a more detailed report than this to get to the bottom of the issue, try running the command using -e -X
to get more information.
Hi, I faced a similar issue (https://keycloak.discourse.group/t/missing-vite-package-json-in-node-modules-during-building-keycloak/24503), but i am not sure if it has the same rootcause.
I just cloned main branch (nightly from 15.02.2024) and executed the build as described here: https://github.com/keycloak/keycloak/blob/main/docs/building.md
Long story short (see the post referenced above for details): In my case leaving the node_modules files in place during maven-clean-plugin execution in the "js/pom.xml" fixed the build. I figured out, that the node_modules directory wasnt clean up properly and .pnpm probably got confused because directories were still in place, but not their contents - and thus couldn't find a package.json it needed to proceed.
Maybe your build is fixed by removing "js/node_modules" entirely and run the build with this modification in the js/pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<followSymLinks>false</followSymLinks>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>**/.wireit/**</include>
<!-- <include>**/node_modules/**</include> -->
</includes>
</fileset>
<!-- include all non-maven projects here as well -->
<fileset>
<directory>apps/keycloak-server</directory>
<includes>
<include>server/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
To any authority involved in making decisions about the codebase: Should I make a PR with the outcommented line deleted?
No need to make a PR, we're aware of this issue (see #27269). Closing this one as it's not actionable.
@jonkoops @TopherJan
I faced same issue, simply delete keycloak/js/node_modules and try to rebuild again
this works for me
but i face the same issue again with all js apps (Keycloak Admin UI, Keycloak Account UI) and if i fixed them by running:
pnpm install --prefer-offline --frozen-lockfile --ignore-scripts
i faced the same error again
[INFO] Reactor Summary for Keycloak 999.0.0-SNAPSHOT: [INFO] [INFO] Keycloak ........................................... SUCCESS [ 0.907 s] [INFO] Keycloak Common .................................... SUCCESS [ 3.594 s] [INFO] Keycloak Core ...................................... SUCCESS [ 2.511 s] [INFO] Keycloak Server SPI ................................ SUCCESS [ 2.152 s] [INFO] Keycloak Server Private SPI ........................ SUCCESS [ 2.369 s] [INFO] Keycloak Crypto Parent ............................. SUCCESS [ 0.015 s] [INFO] Keycloak Crypto Default ............................ SUCCESS [ 0.500 s] [INFO] Keycloak SAML Core Public API ...................... SUCCESS [ 1.280 s] [INFO] Keycloak SAML Core ................................. SUCCESS [ 1.615 s] [INFO] Keycloak Model Parent .............................. SUCCESS [ 0.008 s] [INFO] Keycloak Database Support .......................... SUCCESS [ 0.289 s] [INFO] Keycloak Database Support - Private classes ........ SUCCESS [ 0.822 s] [INFO] Keycloak REST Services ............................. SUCCESS [ 8.732 s] [INFO] Keycloak Crypto FIPS 140-2 Integration ............. SUCCESS [ 0.736 s] [INFO] Keycloak JavaScript Adapter (JAR) .................. FAILURE [ 7.441 s] [INFO] Keycloak JavaScript Parent ......................... SKIPPED [INFO] Keycloak Admin UI .................................. SKIPPED [INFO] Keycloak Account UI ................................ SKIPPED [INFO] Keycloak Themes .................................... SKIPPED [INFO] Keycloak Model JPA ................................. SKIPPED [INFO] Keycloak Kerberos Federation ....................... SKIPPED [INFO] Keycloak LDAP UserStoreProvider .................... SKIPPED [INFO] Keycloak Database Support - REST services .......... SKIPPED [INFO] Keycloak Model Infinispan .......................... SKIPPED [INFO] Keycloak SSSD Federation ........................... SKIPPED [INFO] Keycloak Authz: Parent ............................. SKIPPED [INFO] Keycloak AuthZ: Policy Provider Parent ............. SKIPPED [INFO] Keycloak AuthZ: Common Policy Providers ............ SKIPPED [INFO] Keycloak Quarkus Parent ............................ SKIPPED [INFO] Keycloak Configuration API ......................... SKIPPED [INFO] Keycloak Administration UI ......................... SKIPPED [INFO] Admin UI REST extensions ........................... SKIPPED [INFO] Keycloak Quarkus Server Extension .................. SKIPPED [INFO] Keycloak Quarkus Server Deployment ................. SKIPPED [INFO] Keycloak Integration ............................... SKIPPED [INFO] Keycloak Client CLI ................................ SKIPPED [INFO] Keycloak Client Registration CLI ................... SKIPPED [INFO] Keycloak Admin CLI ................................. SKIPPED [INFO] Keycloak Client CLI Distribution ................... SKIPPED [INFO] Keycloak Quarkus Server App ........................ SKIPPED [INFO] Keycloak Quarkus Server Distribution ............... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE
also after successful build for any js project , the next project fails and all .ts files inside /js folder are deleted i have each time to continue build , remove node_modules under /js and/or restore all .ts files under /js
hope this info helps
Before reporting an issue
Area
core
Describe the bug
I tried building from source using the instructions in https://github.com/keycloak/keycloak/blob/21.1.2/docs/building.md. However, I encounter an error during build:
Version
main
Expected behavior
Success
Actual behavior
Failure
How to Reproduce?
Run the ./mvnw clean install
Anything else?