1

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
2
  • 1
    Please update your question to include a minimal-repro of your issue not just the Dockerfile and errors. We're unable to determine what project code is copied (by e.g. COPY . .) and can only infer the content of package.json. Commented Aug 5, 2024 at 22:25
  • 1
    Running npm install from 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. The cd .. && npm install (in a package.json script?) seems to be trying to install something that's not included in the image. Commented Aug 5, 2024 at 23:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.