OP Here
Since --trace-warnings and --trace-deprecation didn't show a stacktrace, I found another way that did:
process.on('warning', (warning) => {
console.log(warning.stack);
});
Answer from mateos on Stack OverflowOP Here
Since --trace-warnings and --trace-deprecation didn't show a stacktrace, I found another way that did:
process.on('warning', (warning) => {
console.log(warning.stack);
});
Use NODE_OPTIONS:
"scripts": {
"start": "cross-env NODE_OPTIONS=--trace-deprecation react-scripts start",
},
DeprecationWarning when running `npm create astro@latest` with node v24.5.0
Showing deprecation warning in console after upgrading to nodejs v24 lts [DEP0190]
(node:32799) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) - Serverless Framework - Serverless Forums
Deprecation Warning After Node Update
i keep getting this error in my server . I tried to reinstall node_modules but nothing happened .Any idea how to remove this?
"dependencies": {
"autoprefixer": "^10.4.14",
"bcrypt": "^5.1.1",
"bson": "^6.2.0",
"cloudinary": "^1.41.1",
"date-fns": "^2.30.0",
"dotenv": "^16.3.1",
"eslint-config-next": "^14.0.4",
"framer-motion": "^10.16.16",
"jsonwebtoken": "^9.0.2",
"leaflet": "^1.9.4",
"mongodb": "^6.3.0",
"mongoose": "^7.6.7",
"next": "^14.0.4",
"next-auth": "^4.24.5",
"nodemailer": "^6.9.7",
"postcss": "^8.4.27",
"react": "^18.2.0",
"react-date-range": "^1.4.0",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
"react-leaflet": "^4.2.1",
"tailwindcss": "^3.3.3",
"uuid": "^9.0.1"
}
On Macos, Node v22.2.0, I create a project with
npx create-next-app@latest
And the default options. I then run npm i... and npm run dev and access the homepage.
I get the following warnings
~/nextjs-test npm run dev ✔
▲ Next.js 14.2.3
✓ Starting...
✓ Ready in 3.6s
(node:47681) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
○ Compiling / ...
(node:47681) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
The first one seems to be linked to eslint
The second one can disappear if I remove the import of global.css
Any idea how to fix this?
Here is the repository if needed
Github