Node.js官网、常用工具、开发教程和常见问题

2024-06-21 21:29:22 2025-05-05 10:02:43 李腾 21 次阅读 0 次点赞

英文官网:https://nodejs.org/en

中文网:https://www.nodejs.com.cn/

常用工具

NVM

开发教程

Node.js调用动态链接库

常见问题

1、nanopop@2.4.0: The engine "node" is incompatible with this module. Expected version "^20". Got "16.20.2"。

使用nvm工具切换对应的版本,例如:

nvm use 20

方法2,执行以下代码即可:

yarn config set ignore-engines true

2、node-gyp可以不依赖 Visual Studio 吗?

可以的,执行以下命令安装windows-build-tools。

npm install -g windows-build-tools

这时,可能会报这样一个错误:Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor。

打开目录 C:\Users\用户名\.windows-build-tools ,安装 vs_BuildTools.exe 即可。(Visual Studio 15 生成工具 2017)

3、"Visual Studio C++ core features" missing。

安装Visual Studio 15 生成工具 2017时,没有选中 Visual C++生成工具。

4、msvs_version does not match this version. could not find a version of Visual Studio 2017 or newer to use.

执行以下代码即可。

yarn config set msvs_version 2017

5、`msvs_version` is not a valid npm option

npm版本问题,手工编辑 C:\Users\liteng\.npmrc 即可。

本文由人工编写,AI优化,请仔细甄别,转载请注明转自www.hylab.cn,原文地址:Node.js官网、常用工具、开发教程和常见问题

评论 (0)

登录后发表评论

暂无评论,快来发表第一条评论吧!