this is my first question on stackoverflow. Thank you all for this absolute fantastic forum!
I try to get a vue pwa in docker running. I used the vue-cli to setup the pwa application. Installing and running local is no problem.
Then i tried to dockerize the project. I tried with following docker code:
# Start with a Node.js image.
FROM node:10
# Make directory to install npm packages
RUN mkdir /install
ADD ["./code/package.json", "/install"]
WORKDIR /install
RUN npm install --verbose
ENV NODE_PATH=/install
# Copy all our files into the image.
RUN mkdir /code
WORKDIR /code
COPY . /code/
EXPOSE 8080
CMD npm run dev
The problem is when starting up the composition i get the error:
web_1 | internal/modules/cjs/loader.js:573
web_1 | throw err;
web_1 | ^
web_1 |
web_1 | Error: Cannot find module 'chalk'
...
I tried different ways now for a few days. But i can't see any solution. Do i miss something? Is there an incompatibility?
I also tried to change completely to yarn but the effect is the same. So i don't think there is a problem with installing the packages. Could there be a problem with the Node_Path variable?
Thanks for your support in advance!