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

when build fails, it throws error but process do not exit #17

Open
veeramarni opened this issue Apr 29, 2020 · 1 comment
Open

when build fails, it throws error but process do not exit #17

veeramarni opened this issue Apr 29, 2020 · 1 comment

Comments

@veeramarni
Copy link
Contributor

When a build fails especially on frontend, we see it throws an error but process don't exit. Due to it the build just hangs instead of exiting.

server-webpack error ModuleNotFoundError: Module not found: Error: Can't resolve 'apollo-link-scalar' in '/Users/fullstack-pro/servers/frontend-server/src/modules'
    at factory.create (/Users/fullstack-pro/node_modules/webpack/lib/Compilation.js:925:10)

The fix I have found that work is by replacing this line https://github.com/sysgears/larix/blob/master/packages/zen/src/executor.ts#L121 with process.exit(1). Let me know if you want me to send PR.

@larixer
Copy link
Member

larixer commented Apr 29, 2020

@veeramarni I think in that place process.exit would be bad, because it will terminate the process during watch mode, which is not desired. I think exit on error during build should be taken care of via this line:
https://github.com/sysgears/larix/blob/master/packages/zen/src/executor.ts#L1243
Can you try to troubleshoot on your project why this place doesn't get triggered?

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

No branches or pull requests

2 participants