Open joeyhub opened 4 years ago
Currently I am facing the same issue. Although I have installed the package through npm i punycode
, but eslint continues to tells me that 'punycode' module was deprecated since v7
.
And I have found this: https://www.npmjs.com/package/punycode.js . punycode.js
is exactly the same as punycode
which could avoid the case.
Unfortunately npm i --save-dev @types/punycode.js
fails so there is no way to get proper typing with punycode.js
https://www.npmjs.com/package/punycode
Note that userland modules don't hide core modules. For example, `require('punycode')` still imports the deprecated core module even if you executed npm install punycode. Use `require('punycode/')` to import userland modules rather than core modules. ```js const punycode = require('punycode/'); ```
This package uses the same name as the inbuilt punycode package in node.js.
While this might work with the default loader (haven't tried), it can cause an annoyance for package builders (some seem to ignore it as a build in).
Any chance of being able to alias it?