-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
tslib not found in node server production build #2625
Comments
I sense this is because api build does not include vendors. Is there a configuration option I'm missing? |
I added this flag in production build config: |
@vincaslt , thank you, it helped! I would never guess it... |
For people who are trying out You probably have set
There are reasons when such behavior is Preferred but if you want to opt out of it you could set that flag to References |
Should we add the Maybe this could be temporary solutions: 1 -
2 - |
I have the same error but when I set I can't really install missing packages after the build because the production server doesn't have internet access. Is there a way to build in all the necessary dependencies? |
This issue still exists |
I did the following and it worked for me: In the nestjs App's project.json file, configure generatePackageJson : true inside the build configuration section. Then add RUN npm --prefix api-gateway --omit=dev -f install to the Dockerfile |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.
Expected Behavior
I build a production build of my node app, which is generated from
@nrwl/node
, callingnx build api --prod
. I copy the generated files onto my server (or just another directory) and start it withnode main.js
.Current Behavior
The error I get when starting is:
The text was updated successfully, but these errors were encountered: