最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - punycode error while running backend server - Stack Overflow

programmeradmin0浏览0评论

[INFO] 18:13:52 Restarting: C:\Code\MERN_Projects\podify_app\server\src\db\index.ts has been modified (node:22692) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)

I am expecting why this warning showing in terminal while i run server

[INFO] 18:13:52 Restarting: C:\Code\MERN_Projects\podify_app\server\src\db\index.ts has been modified (node:22692) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)

I am expecting why this warning showing in terminal while i run server

Share Improve this question asked Oct 23, 2023 at 12:49 Chakravarthi EChakravarthi E 331 silver badge3 bronze badges 2
  • Have a look at the ments in this question or the relevant documenation. – arnt Commented Oct 23, 2023 at 14:58
  • Does this answer your question? punycode is deprecated in npm - what should I replace it with? – xuhdev Commented May 7, 2024 at 23:28
Add a ment  | 

3 Answers 3

Reset to default 5

you can dowgrade your Node to the 20.9 version.

Uninstalling Node.js from your machine depends on how you installed it. Here are the general steps for different methods:

If you installed Node.js via package manager:

For Ubuntu:

sudo apt-get remove nodejs
sudo apt-get remove npm

For macOS (if you used Homebrew):

brew uninstall node

If you installed Node.js via a binary package from nodejs:

For macOS:

You can remove the Node.js folder directly (default location is /usr/local/lib/node or /usr/local/lib/node_modules or /usr/local/include/node or /usr/local/bin/node). You can also check /usr/local/share/man/man1/node.1.

For Windows:

You can uninstall it like any other Windows program. Go to the Control Panel -> Programs -> Programs and Features, select Node.js, and click Uninstall.

If you installed Node.js via Node Version Manager (nvm):

You can uninstall a specific version with:

nvm uninstall <version>

To pletely remove nvm, delete the nvm directory, which is typically located in your home directory (~/.nvm), and remove the lines that source nvm.sh in your shell profile (.bashrc, .bash_profile, .zshrc, etc.).

Remember to clear the npm cache after uninstalling Node.js:

npm cache clean -f

Also, check your system's PATH to make sure there are no references to Node.js or npm left.

There is the similar answer.

Basically LTS(long term supported) versions are in play. but don't use latest(when I am writing it is 22.13.1). Because I tried and it failed to remove the issue.

I resolved my issue as in below thread:

$nvm install 20.10.0
$nvm use 20.10.0  

punycode is deprecated in npm - what should I replace it with?

发布评论

评论列表(0)

  1. 暂无评论