You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.
In the Dockerfile it is instructed to use RUN npm ci --only=production
instead of RUN npm install
if we are building for production.
When I do this (API in project_prod.js configured to be a local deployment of the API service) I get the following error:
> bullet-train-frontend@1.3.0 dev /usr/src/app
> cross-env npm run env && node_modules/.bin/nodemon --watch server --ignore server/config/config.json --watch webpack --exec node ./server
> bullet-train-frontend@1.3.0 env /usr/src/app
> node ./bin/env.js
Using project_dev.js
sh: 1: node_modules/.bin/nodemon: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! bullet-train-frontend@1.3.0 dev: `cross-env npm run env && node_modules/.bin/nodemon --watch server --ignore server/config/config.json --watch webpack --exec node ./server`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the bullet-train-frontend@1.3.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-11-05T20_45_49_276Z-debug.log
The text was updated successfully, but these errors were encountered:
julianwilkinson
changed the title
Using Production Instructions in Dockerfile doesn't work
Using production instructions in Dockerfile doesn't work
Nov 5, 2019
Hi @julianwilkinson. You could use something like this for production:
FROM node:10
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
COPY . .
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
ENV ENV prod
RUN npm i
RUN npm run env
RUN npm run bundle
EXPOSE 8080
CMD [ "npm", "run", "start" ]
Hi,
In the Dockerfile it is instructed to use
RUN npm ci --only=production
instead of
RUN npm install
if we are building for production.
When I do this (API in project_prod.js configured to be a local deployment of the API service) I get the following error:
The text was updated successfully, but these errors were encountered: