我的 sqlite3 重建生成 electron-v1.4-win32-x64 并要求请求 electron-v1.4-win32-ia32 。有什么想法吗?
My sqlite3 rebuild generates the electron-v1.4-win32-x64 and require asks for electron-v1.4-win32-ia32 . Does any have idea?
这是app的snap和编译好的node文件的snap
我找到了解决方案。
我们构建错误,因为我们在 64 位架构中使用 32 位版本的 nodejs。
你可以通过使用进程来验证你的nodejs的arch。
c:\> node
> process
搜索 target_arch
如果写的是 32,则转到 nodejs.org 并下载 nodejs 的 64 位安装程序。
要遵循的步骤
- 删除 node_modules 文件夹
- 打开命令提示符(运行 作为管理员)
- 检查节点进程架构类型是否为 x64,如图所示。
- 运行 npm 安装
我的package.json文件
{
"name": "sqlite",
"version": "1.0.0",
"description": "This is the tutorial for the sqllite",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron .",
"rebuild": "electron-rebuild -f -w sqlite3"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron-prebuilt": "^1.4.13",
"sqlite3": "^3.1.8"
},
"devDependencies": {
"electron-rebuild": "^1.5.10"
}
}
这是app的snap和编译好的node文件的snap
我找到了解决方案。
我们构建错误,因为我们在 64 位架构中使用 32 位版本的 nodejs。
你可以通过使用进程来验证你的nodejs的arch。
c:\> node
> process
搜索 target_arch
如果写的是 32,则转到 nodejs.org 并下载 nodejs 的 64 位安装程序。
要遵循的步骤
- 删除 node_modules 文件夹
- 打开命令提示符(运行 作为管理员)
- 检查节点进程架构类型是否为 x64,如图所示。
- 运行 npm 安装
我的package.json文件
{
"name": "sqlite",
"version": "1.0.0",
"description": "This is the tutorial for the sqllite",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron .",
"rebuild": "electron-rebuild -f -w sqlite3"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron-prebuilt": "^1.4.13",
"sqlite3": "^3.1.8"
},
"devDependencies": {
"electron-rebuild": "^1.5.10"
}
}