KaotoIO / kaoto

The UI of the Kaoto project
https://kaoto.io
Apache License 2.0
35 stars 27 forks source link

Kaoto build fails on Windows #1592

Open Ortofta opened 1 week ago

Ortofta commented 1 week ago

Describe the Bug

Running yarn workspace @kaoto/camel-catalog run build fails on Windows (using Powershell 7.4.5), with the following error message:

[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing C:\data\GitHub\kaoto\packages\catalog-generator\target\catalog-generator-0.0.1-SNAPSHOT.jar with C:\data\GitHub\kaoto\packages\catalog-generator\target\catalog-generator-0.0.1-SNAPSHOT-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  55.759 s
[INFO] Finished at: 2024-10-25T15:18:14+02:00
[INFO] ------------------------------------------------------------------------
okt. 25, 2024 3:18:14 EM io.kaoto.camelcatalog.commands.GenerateCommandOptions addDefaultVersions
WARNING:
No Camel Main catalog version specified.
Generating the main catalog with the installed version
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
okt. 25, 2024 3:18:14 EM io.kaoto.camelcatalog.commands.GenerateCommand run
INFO: Output folder: C:\data\GitHub\kaoto\packages\catalog-generator\.\dist\camel-catalog
Catalog versions: [CatalogCliArgument{runtime=Main, version='4.8.0'}, CatalogCliArgument{runtime=Quarkus, version='3.15.0'}, CatalogCliArgument{runtime=SpringBoot, version='4.8.0'}]
Kamelets version: null
okt. 25, 2024 3:18:14 EM io.kaoto.camelcatalog.commands.GenerateCommand lambda$run$0
INFO: Generating catalog: Main 4.8.0

okt. 25, 2024 3:18:24 EM io.kaoto.camelcatalog.commands.GenerateCommand lambda$run$0
INFO: Generating catalog: Quarkus 3.15.0

okt. 25, 2024 3:18:33 EM io.kaoto.camelcatalog.commands.GenerateCommand lambda$run$0
INFO: Generating catalog: SpringBoot 4.8.0

(node:33664) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:33664) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
---

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
Error: Cannot find module 'C:\data\GitHub\kaoto\packages\catalog-generator\dist\camel-catalog\crd-schema-integration-45d030183c81bf19cae4091ea0b16d90.json' imported from C:\data\GitHub\kaoto\packages\catalog-generator\scripts\json-schema-to-typescript.mts
    at finalizeResolution (C:\data\GitHub\kaoto\node_modules\ts-node\dist-raw\node-internal-modules-esm-resolve.js:366:11)
    at moduleResolve (C:\data\GitHub\kaoto\node_modules\ts-node\dist-raw\node-internal-modules-esm-resolve.js:801:10)
    at Object.defaultResolve (C:\data\GitHub\kaoto\node_modules\ts-node\dist-raw\node-internal-modules-esm-resolve.js:912:11)
    at C:\data\GitHub\kaoto\node_modules\ts-node\src\esm.ts:218:35
    at entrypointFallback (C:\data\GitHub\kaoto\node_modules\ts-node\src\esm.ts:168:34)
    at C:\data\GitHub\kaoto\node_modules\ts-node\src\esm.ts:217:14
    at addShortCircuitFlag (C:\data\GitHub\kaoto\node_modules\ts-node\src\esm.ts:409:21)
    at resolve (C:\data\GitHub\kaoto\node_modules\ts-node\src\esm.ts:197:12)
    at nextResolve (node:internal/modules/esm/hooks:864:28)
    at Hooks.resolve (node:internal/modules/esm/hooks:302:30)

Node.js v18.20.4

Steps to Reproduce the Bug or Issue

  1. Run yarn workspace @kaoto/camel-catalog run build in Powershell
  2. Wait for error to occur

Screenshots or Videos

No response

Platform

lordrip commented 4 days ago

Thanks for raising this up @Ortofta :+1:

Ortofta commented 4 days ago

No worries - let me know if you need more info or if you want me to test anything.

wJJwJJwJJwJJ commented 6 hours ago

macos

when l run yarn install :

YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0007: │ kaoto@workspace:. must be built because it never has been before or the last one failed ^C➤ YN0009: │ kaoto@workspace:. couldn't be built successfully (exit code 129, logs can be found here:

then l run "postinstall": "yarn workspace @kaoto/camel-catalog run build",

node:internal/process/esm_loader:34 internalBinding('errors').triggerUncaughtException( ^ Error: Cannot find package 'json-schema-to-typescript' imported from /Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/packages/catalog-generator/scripts/json-schema-to-typescript.mts at packageResolve (/Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:757:9) at moduleResolve (/Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:798:18) at Object.defaultResolve (/Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:912:11) at /Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/src/esm.ts:218:35 at entrypointFallback (/Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/src/esm.ts:168:34) at /Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/src/esm.ts:217:14 at addShortCircuitFlag (/Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/src/esm.ts:409:21) at resolve (/Users/junjiewang/Desktop/GKSK/code/interface-kaoto-fronted/.yarn/virtual/ts-node-virtual-564caa690c/5/.yarn/berry/cache/ts-node-npm-10.9.2-3f3890b9ac-10c0.zip/node_modules/ts-node/src/esm.ts:197:12) at nextResolve (node:internal/modules/esm/hooks:866:28) at Hooks.resolve (node:internal/modules/esm/hooks:304:30)

Platform macos 15

NodeJS 20.12.0 Version: 2.3.0-dev

lordrip commented 4 hours ago

Hi @wJJwJJwJJwJJ, it looks like the yarn dependencies weren't installed, that would explain the post install failure. Could you please check the file that is expressed here:

exit code 129, logs can be found here: <filename>

My guess would be that maybe mvn is missing, but the logs will show the problem