I’m trying to publish a vscode snippet. There is a library in my node_modules
(markdown-it) which uses punycode
.
var punycode = require('punycode');
If I use it as it is I get error:
(node:50601) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
If I change it to:
var punycode = require('punycode/');
I get error:
node:internal/modules/cjs/loader:1222
throw err;
^
Error: Cannot find module 'punycode/'
Require stack:
- /data/Code/shellman/node_modules/markdown-it/lib/index.js
- /data/Code/shellman/node_modules/markdown-it/index.js
- /data/Code/shellman/node_modules/@vscode/vsce/out/package.js
- /data/Code/shellman/node_modules/@vscode/vsce/out/main.js
- /data/Code/shellman/node_modules/@vscode/vsce/vsce
at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15)
...
}
How to solve this problem?
I searched web a there is one Q/A about punycode which didn’t help me.
New contributor
Masoud Yousefvand is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.