log transpile (tsc) error
surlacolline opened this issue · comments
Hello,
the build.js script does not log error during the transpile step.
I tried this with no success :
const proc = childProcess.exec('tsc --build tsconfig.prod.json', (error) => { if (error) console.log('my log : ' + error); });
But the error does not contains any details.
What helped me was to :
- remove from build.js
childProcess.exec('tsc --build tsconfig.prod.json')
- add to package.json
"scripts": { "build": "node ./util/build.js && npm run transpile", "tsc": "tsc --build tsconfig.prod.json", "transpile": "npm run tsc"}
By executing the tsc command this way, errors are logged. It saved me when I was trying to deploy on Heroku, maybe it can help others.
Elise
hmmm I'll think about it, seems a little scattered. I'll see if there's a way to throw tsc errors in npm
Thanks for pointing this out. I implemented the fix in version 1.6.6