(node-v72 ABI, unknown) (falling back to source compile with node-gyp)
Windows下安装node_modules模块sqlite3
一、sqlite3简介
SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day.
window下安装sqlite3,参考:https://www.runoob.com/sqlite/sqlite-installation.html
二 安装node_modules模块sqlite3
1、会出现如下错误
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error getaddrinfo ENOENT mapbox-node-binary.s3.amazonaws.com
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
unpack_sqlite_dep
‘python2.7’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe”已退出,
代码为 1。 [C:\Users\Administrator\Desktop\bb\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
gyp ERR! build error
2、解决方案:用淘宝镜像源安装
cnpm i sqlite3
三、附注:
1、如何配置淘宝镜像源
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install <模块名字>
2、npm安装需要有package.json
package.json是什么?
什么是Node.js的模块(Module)?在Node.js中,模块是一个库或框架,也是一个Node.js项目。Node.js项目遵循模块化的架构,当我们创建了一个Node.js项目,意味着创建了一个模块,这个模块的描述文件,被称为package.json。
生成package.json的方式
npm init
package.json
3、应用程序二进制接口(ABI)
应用程序二进制接口(application binary interface,ABI)是程序通过调用函数使用其它编译程序中的数据结构的一种方式。它是应用程序接口(API)的编译版本。
在node.js交互式解释器中输入:
process.platform
process.arch
process.versions.modules
依次得到操作系统平台、位数、node.js的ABI版本信息
参考:
1、npm 下载包依赖 老报错:https://segmentfault.com/q/1010000020374520
2、Pre-built binaries not found for [email protected] and [email protected]:https://www.alankeene.com/2019/0102/fsevents-didnot-soppurt-node11.html
3、Node下使用sqlite3:https://www.jianshu.com/p/9645da1277b1