Dockerfile:
FROM node:22-alpine3.19
WORKDIR /app
COPY . .
RUN npm i
COPY .env.sample .env.local
EXPOSE 5173
CMD ["npm","run","dev","--","--host"]
ERROR
npm warn deprecated [email protected]: Use your platform's native DOMException instead
npm warn deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
> [email protected] prepare
> cd .. && npm install
npm error Tracker "idealTree" already exists
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-08-05T21_26_45_767Z-debug-0.log
npm error code 1
npm error path /app
npm error command failed
npm error command sh -c cd .. && npm install
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-08-05T21_18_16_441Z-debug-0.log
Dockerfileand errors. We're unable to determine what project code is copied (by e.g.COPY . .) and can only infer the content ofpackage.json.npm installfrom the filesystem root directory seems to cause this problem; also see npm ERR! Tracker "idealTree" already exists while creating the Docker image for Node project. Thecd .. && npm install(in apackage.jsonscript?) seems to be trying to install something that's not included in the image.