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

[@loopback/build] - lb-tsc: not found. Because NODE_ENV = production #10020

Open
sebacampos opened this issue Sep 28, 2023 · 1 comment
Open
Labels

Comments

@sebacampos
Copy link

Describe the bug

Hi! In all examples @loopback/build is installed as dev dependency ---> npm i @loopback/build --save-dev

This causes issues with NODE_ENV=production (specially when trying to deploy the app) as dev dependencies are not resolved...

I fixed this by using npm i --include=dev in my Dockerfile. But I don't think that's entirely right...

What's the recommendation here?

Thanks in advance!

Logs

No response

Additional information

No response

Reproduction

export NODE_ENV=production; npm i

@sebacampos sebacampos added the bug label Sep 28, 2023
@nflaig
Copy link
Member

nflaig commented Sep 28, 2023

Dev dependencies are as the name implies for development, I am not sure why you would need @loopback/build during production but you have to add it to dependencies then. I asked a related questions on stackoverflow 4 years ago but I would generally just recommend to use docker to deploy your app to production which looks like is what you are doing.

If you can provide your Dockerfile and more details on why you need @loopback/build in production, I can give you some suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants