loopbackio / loopbackio/loopback-next

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

Open
#10,020 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

### 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the examples that install @loopback/build as a dev dependency and reproduce `export NODE_ENV=production; npm i`; then compare that behavior with the Dockerfile's `npm i --include=dev` workaround. Done means establishing and applying a clear recommendation for installing or declaring @loopback/build in production deployments.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.