In a Firebase app (using NextJS) that I am updating, I am having the following issue.
When running this command:
% npm run build
I get the following message:
(node:3719) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Since I have already seen this kind of warning in a few Heroku apps, I used the same strategy to solve the issue as I did before; namely: installing punycode by running this.
% npm install punycode
and next editing the file ./node_modules/tr46/index.js, to change this line:
const punycode = require("punycode");
to that one:
const punycode = require("punycode/");
But unlike in the case of an Heroku app, here it does not seem to fix the problem. Therefore my question to any Firebase expert used to deal with NextJS. What is the correct way to solve this ?
I found that if you update to the latest firebase-functions in your NPM repo message goes away.