ChuckJonas/extract-interface-ts

Build error on windows

Opened this issue · 0 comments

I downloaded your project and ran npm install. It generated an error which suggests to me you have a hard-coded path somewhere that should be made relative to the project directory.

In other words, not everyone will clone your project into a directory named /Users/Jonas, so you don't want to include that path in the package.json scripts. The npm command will allways be run with the directory where package.json is locate being the current working directory, so relative paths like src/grammar/Java.g4 are better than ones rooted up at /Users.

Here's the output (on a windows machine)

C:\code\extract-interface-ts>npm install

> extract-interface-ts@1.0.0 install C:\code\extract-interface-ts
> npm run antlr4ts


> extract-interface-ts@1.0.0 antlr4ts C:\code\extract-interface-ts
> antlr4ts -visitor /Users/jonas/Documents/code/apex-parser-ts/src/grammar/Java.g4

error(7):  cannot find or open file: /Users/jonas/Documents/code/apex-parser-ts/src/grammar/Java.g4
child process exited with code  1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! extract-interface-ts@1.0.0 antlr4ts: `antlr4ts -visitor /Users/jonas/Documents/code/apex-parser-ts/src/grammar/Java.g4`
npm ERR! Exit status 1
...