[已解决] npm ERR! code EINVALIDPACKAGENAME Invalid package name "": name cannot start with an underscore;
阅读原文时间:2023年07月08日阅读:4
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "srt-to-vtt" "-g"
14 verbose node v14.18.1
15 verbose npm  v6.14.15
16 error code EINVALIDPACKAGENAME
17 error Invalid package name "_@babel_parser@7.15.8@@babel": name cannot start with an underscore; name can only contain URL-friendly characters
18 verbose exit [ 1, true ]

解决方案
打开 cmd 输入 npm update -g 等待更新完成即可