Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pepr build can silently fail #233

Closed
bburky opened this issue Aug 30, 2023 · 2 comments · Fixed by #236
Closed

pepr build can silently fail #233

bburky opened this issue Aug 30, 2023 · 2 comments · Fixed by #236
Assignees

Comments

@bburky
Copy link
Member

bburky commented Aug 30, 2023

If there is a json syntax error in package.json, npx pepr build has no output and silently fails:

$ npx pepr build -l debug
{"level":20,"time":1693417225078,"pid":12932,"hostname":"Blakes-MacBook-Pro.local","msg":"Unexpected token / in JSON at position 301"}

If the user has no node_modules/ (has not yet run npm install), npx pepr build has no output and silently fails:

$ npx pepr build -l debug
{"level":20,"time":1693417811820,"pid":13682,"hostname":"Blakes-MacBook-Pro.local","msg":"Command failed: ./node_modules/.bin/tsc\n/bin/sh: ./node_modules/.bin/tsc: No such file or directory\n"}
{"level":20,"time":1693417811821,"pid":13682,"hostname":"Blakes-MacBook-Pro.local","msg":""}
{"level":20,"time":1693417811821,"pid":13682,"hostname":"Blakes-MacBook-Pro.local","msg":"/bin/sh: ./node_modules/.bin/tsc: No such file or directory\n"}

These errors should print an error message.

@bdw617 bdw617 self-assigned this Aug 31, 2023
@bdw617
Copy link
Contributor

bdw617 commented Aug 31, 2023

I've isolated this, easy fix coming

@bdw617
Copy link
Contributor

bdw617 commented Aug 31, 2023

@jeff-mccoy here's a temp fix, will do the PR now...

➜  meow git:(master) ✗ npx pepr build
{"level":50,"time":1693495178018,"pid":32139,"hostname":"dad","msg":"Command failed: ./node_modules/.bin/tsc"}
{"level":50,"time":1693495178019,"pid":32139,"hostname":"dad","msg":"pepr.ts(1,1): error TS1435: Unknown keyword or identifier. Did you mean 'import'?\npepr.ts(1,24): error TS1434: Unexpected keyword or identifier.\n"}
{"level":50,"time":1693495178019,"pid":32139,"hostname":"dad","msg":""}

versus no output.

@bdw617 bdw617 linked a pull request Aug 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants