Docker Community Forums

Share and learn in the Docker community.

Docker compose build error on Windows

build
docker

(Johanjtg) #1

I am getting an error when I try to run the follow docker-compose

npm ERR! path /usr/src/app/package.json

npm ERR! code ENOENT

npm ERR! errno -2

npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open ‘/usr/src/app/package.json’

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

2018-11-02T17:40:07.391181200Z

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2018-11-02T17_40_07_382Z-debug.log

-----------------Docker compose----------------

version: ‘2’
services:
mongodb:
image: “mongo”
ports:
- “27017:27017”
backend:
build: ./node-backend/
ports:
- “6200:6200”
volumes:
- ./node-backend:/usr/src/app
depends_on:
- mongodb
frontend:
build: ./react-frontend/
ports:
- “3000:3000”
volumes:
- ./react-frontend:/usr/src/app
depends_on:
- backend

----------------------Docker file -------------------

FROM node:8.9.4
WORKDIR /usr/src/app

RUN npm install -g nodemon

EXPOSE 3000
CMD [ “npm”, “start” ]