punycode deprecated when using docker
Answered
Philippine Crocodile posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Philippine CrocodileOP
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 Philippine Crocodile
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
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Philippine CrocodileOP
With
pnpm run dev
![Image](https://cdn.discordapp.com/attachments/1213610085176315904/1213610273596776569/image.png?ex=65f619a5&is=65e3a4a5&hm=ba936d19d7b7d390809ff839e8b13c515abe032a3e14da83df499130b5e35ce8&)
With Docker
![Image](https://cdn.discordapp.com/attachments/1213610085176315904/1213610359643185203/image.png?ex=65f619b9&is=65e3a4b9&hm=2bd1ff759332554403186873b7d6796ebb29e90854b1f5cc3cf40aeb229b4012&)
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Philippine CrocodileOP
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
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
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
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Philippine CrocodileOP
I don't use punycode, that was the default Next.js project's code with node v21