'ng not found (Docker Compose)
I'm trying to build and run, but it says that "ng not found" and finally, that the container exited with code 127. Well, running npm install and then ng serve --open is sufficient for run my application outside a docker container, but inside it, simple doesn't works. I tried do RUN node_modules/.bin/ng build --prod, but .bin folder isn't there (what I think that is the problem, but I really don't know how to solve it, because even .dockerignore is not ignoring .bin). So, what should I do?
Dockerfile:
FROM node:lts-alpine
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent
COPY . .
RUN ls node_modules
EXPOSE 3000
USER node
CMD ["npm", "start"]
I also tried to `npm install @angular/cli -g', but I get into another error...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
