punycode deprecated when using docker
Answered
ViipeR posted this in #help-forum
ViipeROP
Hello, it seems that my Next.js app's Docker container isn't set correctly because it says that
My Dockerfile
punycode
module is deprecated but when I launch it with pnpm run dev
the module isn't deprecated. How can I do?My Dockerfile
FROM node:latest
WORKDIR /app
RUN npm install -g pnpm
COPY pnpm-lock.yaml ./
COPY package.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["pnpm", "run", "dev"]
Answered by ViipeR
I found. I'm using nodejs v20.11.1 ans my Docker container is with nodejs v21.6.2 and punycode was depreciated betweed v20.11.1 and v21.6.2. I downgraded my Docker container's nodejs version to v20.11.1 and it works
6 Replies
With Docker
ViipeROP
I found. I'm using nodejs v20.11.1 ans my Docker container is with nodejs v21.6.2 and punycode was depreciated betweed v20.11.1 and v21.6.2. I downgraded my Docker container's nodejs version to v20.11.1 and it works
Answer
I found this warning to be harmless, I’m using node 21 and get bombarded with that warning every time and I just ignore, no need to worry about it
If you use the punycode module in your code, you should migrate but here it’s a library’s fault so there’s nothing you can do anyway (other than downgrading node) so just ignore the warning
ViipeROP
I don't use punycode, that was the default Next.js project's code with node v21