eclipse-lyo / lyo.oslc-ui

Eclipse Public License 2.0
3 stars 7 forks source link

node.js version #24

Closed Krusty84 closed 1 year ago

Krusty84 commented 1 year ago

Hello Dear Team, Which version of node.js should be used? Cause I got a lot of errors during executing npm run build:elements-prod Thanks, have a good Xmas!

Krusty84 commented 1 year ago

Well, some troubles were fixed after installing Node.JS 14.15.1 https://nodejs.org/en/blog/release/v14.15.1/

As result I got dist folder, but I still have some troubles:

chunk {1} main-es5.js (main) 419 kB [initial] [rendered]
chunk {4} styles.css (styles) 205 kB [initial] [rendered]
Date: 2022-12-21T10:28:27.150Z - Hash: 48935ec5a295331214ef - Time: 47963ms

> oslc-ui@0.0.0 generate D:\_DEV_\lyo.oslc-ui-master
> npm run create-preview-schema && npm run create-link-schema && npm run create-java-preview-classes && npm run create-java-link-classes

> oslc-ui@0.0.0 create-preview-schema D:\_DEV_\lyo.oslc-ui-master
> ts-json-schema-generator --type Preview --tsconfig ./tsconfig.json --path "./src/app/preview/models.ts" > src/preview-schemas.json

> oslc-ui@0.0.0 create-link-schema D:\_DEV_\lyo.oslc-ui-master
> ts-json-schema-generator --type Link --tsconfig ./tsconfig.json --path "./src/app/preview/models.ts" > src/link-schemas.json

> oslc-ui@0.0.0 create-java-preview-classes D:\_DEV_\lyo.oslc-ui-master
> ./libs/jsonschema2pojo-1.0.2/bin/jsonschema2pojo --source "src/preview-schemas.json" --target dist/oslc-ui/java-gen -p org.eclipse.lyo.oslc_ui

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oslc-ui@0.0.0 create-java-preview-classes: `./libs/jsonschema2pojo-1.0.2/bin/jsonschema2pojo --source "src/preview-schemas.json" --target dist/oslc-ui/java-gen -p org.eclipse.lyo.oslc_ui`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oslc-ui@0.0.0 create-java-preview-classes 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\######\AppData\Roaming\npm-cache\_logs\2022-12-21T10_28_34_793Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oslc-ui@0.0.0 generate: `npm run create-preview-schema && npm run create-link-schema && npm run create-java-preview-classes && npm run create-java-link-classes`      
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oslc-ui@0.0.0 generate 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\######\AppData\Roaming\npm-cache\_logs\2022-12-21T10_28_34_823Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oslc-ui@0.0.0 build:elements-prod: `npm install && node --max-old-space-size=6144 ./node_modules/@angular/cli/bin/ng build --prod --output-hashing none && npm run generate`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oslc-ui@0.0.0 build:elements-prod 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\######\AppData\Roaming\npm-cache\_logs\2022-12-21T10_28_34_855Z-debug.log

Thank you for any ideas.

jadelkhoury commented 1 year ago

Hi @Krusty84 !

Can you anyway use the resulting stuff from the dist folder? Maybe you should not worry about this error, since it is a final step to produce some java classes, which are available here anyway https://github.com/eclipse/lyo/tree/master/server/oslc-ui-model

And, as the instructions in the Readme.md file say, you can include those by using this in your pom.xml file.

<dependency>
    <groupId>org.eclipse.lyo.server</groupId>
    <artifactId>oslc-ui-model</artifactId>
    <version>4.1.0-SNAPSHOT</version>
</dependency>

From the log you shared, there seems to be a problem with the command ./libs/jsonschema2pojo-1.0.2/bin/jsonschema2pojo when running locally.

berezovskyi commented 1 year ago

Added Node v14 to the CI matrix in addition to Node 12, which is EOL (#26).

The build fails on Node 16, 18. If you can help fix it @Krusty84, please suggest changes to #27!