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
Hi, I was able to run yarn web:start from CMD. However when I try to run this in Docker. I got package.json not found error.
Here is the docker file:
FROM node:16.13.0-alpine
set working directory
WORKDIR /
COPY ["yarn.lock", "package.json", "./"]
RUN yarn reset:unix
RUN yarn
add app
COPY . ./
start app
CMD ["yarn", "web:start"]
After successful docker build, I try to run in docker desktop:
docker run -p:3000:3000 myimage
I got this error:
yarn run v1.22.15
$ yarn workspace @my-app/web start
$ craco start
/node_modules/find-root/index.js:19
throw new Error('package.json not found in path')
^
Error: package.json not found in path
at findRoot (/node_modules/find-root/index.js:19:11)
at findRoot (/node_modules/find-root/index.js:28:10)
at findRoot (/node_modules/find-root/index.js:28:10)
at findRoot (/node_modules/find-root/index.js:28:10)
at findRoot (/node_modules/find-root/index.js:28:10)
Any idea on this?
Thanks for the help
The text was updated successfully, but these errors were encountered:
Hi, I was able to run yarn web:start from CMD. However when I try to run this in Docker. I got package.json not found error.
Here is the docker file:
FROM node:16.13.0-alpine
set working directory
WORKDIR /
COPY ["yarn.lock", "package.json", "./"]
RUN yarn reset:unix
RUN yarn
add app
COPY . ./
start app
CMD ["yarn", "web:start"]
After successful docker build, I try to run in docker desktop:
docker run -p:3000:3000 myimage
I got this error:
yarn run v1.22.15
$ yarn workspace @my-app/web start
$ craco start
/node_modules/find-root/index.js:19
throw new Error('package.json not found in path')
^
Error: package.json not found in path
at findRoot (/node_modules/find-root/index.js:19:11)
at findRoot (/node_modules/find-root/index.js:28:10)
at findRoot (/node_modules/find-root/index.js:28:10)
at findRoot (/node_modules/find-root/index.js:28:10)
at findRoot (/node_modules/find-root/index.js:28:10)
Any idea on this?
Thanks for the help
The text was updated successfully, but these errors were encountered: