node.js NPM 问题:Node-pre-gyp。使用 node-pre-gyp https 下载请求

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/52728234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 18:55:21  来源:igfitidea点击:

NPM PROBLEM: Node-pre-gyp. Using request for node-pre-gyp https download

node.jsexpressnpmsqlite

提问by TEO

I am creating Angular project and using Express.js as back-end and SQLite3 for database. When I am installing sqlite3 via command npm install sqlite3I'm getting following error in the console. How can I solve this problem?

我正在创建 Angular 项目并使用 Express.js 作为后端和 SQLite3 作为数据库。当我通过命令安装 sqlite3 时npm install sqlite3,在控制台中出现以下错误。我怎么解决这个问题?

> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download

Error is at the bottom with purple color

错误位于底部,带有紫色

回答by mihai

It's a warning saying that it needs to download prebuilt binaries to install the module.

这是一个警告,说它需要下载预构建的二进制文件来安装模块。

sqlite3is a native module, so it either needs to be built from source or installed via binary download. If you have Visual Studio installed, you ca try npm install sqlite3 --build-from-source, which is also a safer option.

sqlite3是本机模块,因此它需要从源代码构建或通过二进制下载安装。如果你安装了 Visual Studio,你可以试试npm install sqlite3 --build-from-source,这也是一个更安全的选择。