oasis-open / odata-rapid

Rapid - Specification, tools and libraries to support the development and adoption of simple REST-based APIs.
https://rapid.rocks
Apache License 2.0
17 stars 8 forks source link

project root is monorepo #406

Closed ralfhandl closed 1 year ago

ralfhandl commented 1 year ago
mikepizzo commented 1 year ago

I get the following errors when I try to do npm run build:

build npm run build --workspaces --if-present

odata-uri@1.0.0 build npm run antlr4ts && webpack

odata-uri@1.0.0 antlr4ts antlr4ts -visitor -no-listener -o src/parsers src/parsers/ODataUriQuery.g4

node:events:505 throw er; // Unhandled 'error' event ^

Error: spawn java ENOENT at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on ChildProcess instance at: at ChildProcess._handle.onexit (node:internal/child_process:289:12) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn java', path: 'java', spawnargs: [ '-jar', 'c:\Repos\Rapid\odata-rapid-root-monorepo\node_modules\antlr4ts-cli\target\antlr4-typescript-4.9.0-SNAPSHOT-complete.jar', '-visitor', '-no-listener', '-o', 'src/parsers', 'src/parsers/ODataUriQuery.g4' ] }

Node.js v18.1.0 npm ERR! Lifecycle script antlr4ts failed with error: npm ERR! Error: command failed npm ERR! in workspace: odata-uri@1.0.0 npm ERR! at location: c:\Repos\Rapid\odata-rapid-root-monorepo\tools\odataUri npm ERR! Lifecycle script build failed with error: npm ERR! Error: command failed npm ERR! in workspace: odata-uri@1.0.0 npm ERR! at location: c:\Repos\Rapid\odata-rapid-root-monorepo\tools\odataUri

ralfhandl commented 1 year ago

I did a clean checkout, switched to this branch, then in the project root

Ran through without problems in PowerShell 7.2.6 and cmd.

ralfhandl commented 1 year ago

Error: spawn java ENOENT

@mikepizzo Can you please check whether you have Java installed and in the path?

In your pwsh type

java -version
ralfhandl commented 1 year ago

Reason was that the old build script did not compile the URL ABNF to TypeScript, this needed to be done manually.