Closed ralfhandl closed 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
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.
Error: spawn java ENOENT
@mikepizzo Can you please check whether you have Java installed and in the path?
In your pwsh
type
java -version
Reason was that the old build script did not compile the URL ABNF to TypeScript, this needed to be done manually.