“确保安装
node
和 npm
,以便能够自动报告源文件中与可访问性、兼容性、安全性等相关的问题。”
我已经安装了npm和Node js(都是最新版本)并检查了多次。我仍然经常在 VS Code 上收到此消息。我在本地环境或搜索网络上找不到任何合理的原因。
我的环境详细信息: Windows 11; npm 8.11.0; 节点 16.15.1.
有什么会影响我的项目吗?我正在从事扩展开发(初级水平)。
什么触发了此消息以及如何解决此问题? 更新:它正在影响我的项目。
对于遇到此问题的其他人,只需安装相关软件包即可为我修复此问题,在
Fedora 40上使用
code-insiders-1.90.0-1715753654.el8.rpm
:
RokeJulianLockhart@sayw4i:~$ sudo dnf5 install node npm [sudo] password for RokeJulianLockhart: Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: nodejs x86_64 1:20.12.2-1.fc40 updates 146.1 KiB nodejs-npm x86_64 1:10.5.0-1.20.12.2.1.fc40 updates 7.9 MiB Installing dependencies: nodejs-cjs-module-lexer noarch 1.2.3-5.fc40 fedora 148.4 KiB nodejs-libs x86_64 1:20.12.2-1.fc40 updates 59.8 MiB nodejs-undici noarch 6.11.1-2.fc40 updates 1.2 MiB Installing weak dependencies: nodejs-docs noarch 1:20.12.2-1.fc40 updates 86.8 MiB nodejs-full-i18n x86_64 1:20.12.2-1.fc40 updates 29.4 MiB Transaction Summary: Installing: 7 packages Total size of inbound packages is 35 MiB. Need to download 35 MiB. After this operation 185 MiB will be used (install 185 MiB, remove 0 B). Is this ok [y/N]: y [1/7] nodejs-cjs-module-lexer-0:1.2.3-5.fc40.noarch 100% | 242.6 KiB/s | 37.1 KiB | 00m00s [2/7] nodejs-1:20.12.2-1.fc40.x86_64 100% | 324.7 KiB/s | 51.0 KiB | 00m00s [3/7] nodejs-undici-0:6.11.1-2.fc40.noarch 100% | 3.0 MiB/s | 291.8 KiB | 00m00s [4/7] nodejs-npm-1:10.5.0-1.20.12.2.1.fc40.x86_64 100% | 563.1 KiB/s | 2.2 MiB | 00m04s [5/7] nodejs-docs-1:20.12.2-1.fc40.noarch 100% | 1.4 MiB/s | 8.2 MiB | 00m06s [6/7] nodejs-libs-1:20.12.2-1.fc40.x86_64 100% | 2.2 MiB/s | 15.5 MiB | 00m07s [7/7] nodejs-full-i18n-1:20.12.2-1.fc40.x86_64 100% | 1.9 MiB/s | 8.4 MiB | 00m04s ------------------------------------------------------------------------------------------------------------------------------------- [7/7] Total 100% | 3.7 MiB/s | 34.7 MiB | 00m09s Running transaction [1/9] Verify package files 100% | 87.0 B/s | 7.0 B | 00m00s >>> Running pre-transaction scriptlet: nodejs-1:20.12.2-1.fc40.x86_64 >>> Stop pre-transaction scriptlet: nodejs-1:20.12.2-1.fc40.x86_64 [2/9] Prepare transaction 100% | 21.0 B/s | 7.0 B | 00m00s [3/9] Installing nodejs-docs-1:20.12.2-1.fc40.noarch 100% | 306.0 MiB/s | 86.9 MiB | 00m00s [4/9] Installing nodejs-undici-0:6.11.1-2.fc40.noarch 100% | 24.3 MiB/s | 1.2 MiB | 00m00s [5/9] Installing nodejs-libs-1:20.12.2-1.fc40.x86_64 100% | 623.2 MiB/s | 59.8 MiB | 00m00s [6/9] Installing nodejs-cjs-module-lexer-0:1.2.3-5.fc40.noarch 100% | 21.1 MiB/s | 150.9 KiB | 00m00s [7/9] Installing nodejs-npm-1:10.5.0-1.20.12.2.1.fc40.x86_64 100% | 17.0 MiB/s | 8.3 MiB | 00m00s [8/9] Installing nodejs-full-i18n-1:20.12.2-1.fc40.x86_64 100% | 587.1 MiB/s | 29.4 MiB | 00m00s [9/9] Installing nodejs-1:20.12.2-1.fc40.x86_64 100% | 224.9 KiB/s | 148.2 KiB | 00m01s >>> Running trigger-install scriptlet: glibc-common-0:2.39-8.fc40.x86_64 >>> Stop trigger-install scriptlet: glibc-common-0:2.39-8.fc40.x86_64 >>> Running trigger-install scriptlet: man-db-0:2.12.0-6.fc40.x86_64 >>> Stop trigger-install scriptlet: man-db-0:2.12.0-6.fc40.x86_64 RokeJulianLockhart@sayw4i:~$ code-insiders
因此,我所在机器的所有不一致行为都已解决。
尝试了多种方法后,我通过“删除所有内容”重置了 Windows。它就像一个向导一样工作。然后,我安装了 Node、VS Code 和 Yeoman。他们在第一次尝试时就毫无问题地工作了。
我的经验是 Windows 11 可能存在一些内置问题,因为它非常新。