“在Windows上的sqlite3@3.1.13安装脚本'node-pre-gyp install --fallback-to-build'”失败

时间:2018-04-24 03:51:39

标签: sqlite npm

我正在尝试安装Gekko,我收到以下错误:

node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@6.9.4 (node-v48 ABI) (falling back to source compile with node-gyp)

C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean )  else (node "" clean )

C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build "--module=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64\node_sqlite3.node" --module_name=node_sqlite3 "--module_path=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64" )  else (node "" configure --fallback-to-build "--module=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64\node_sqlite3.node" --module_name=node_sqlite3 "--module_path=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64" )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\SOBER CHECK\\Downloads\\gekko-develop\\gekko-develop\\node_modules\\sqlite3\\lib\\binding\\node-v48-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\SOBER CHECK\\Downloads\\gekko-develop\\gekko-develop\\node_modules\\sqlite3\\lib\\binding\\node-v48-win32-x64"
gyp ERR! cwd C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3
gyp ERR! node -v v6.9.4
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SOBER CHECK\\Downloads\\gekko-develop\\gekko-develop\\node_modules\\sqlite3\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3
node-pre-gyp ERR! node -v v6.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\node_modules\sqlite3\lib\binding\node-v48-win32-x64' (1)
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "sqlite3"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! sqlite3@3.1.13 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.13 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\SOBER CHECK\Downloads\gekko-develop\gekko-develop\npm-debug.log

我在Windows 10上使用节点版本6.9.4和NPM版本3.10.10。

请帮助 - 我该怎么做才能解决这个问题并完成安装Gekko? 我也在Github回购中发布了这个问题as an issue,但我没有太多希望得到回复。

任何帮助使这个例子更小(如最小可验证的例子)或任何所需的额外信息将非常感激;我不太了解这个问题是一个容易回答的问题。

2 个答案:

答案 0 :(得分:0)

您已链接的GitHub问题was resolved,其中包含更新为*的解决方案。但是,有关您问题的评论者正在使用更高版本的Node v9或更高版本的Node v10,因此此sqlite3@^4.0.1版本升级可能无法解决您的问题。 Gekko在Gekko v0.6.3中已更新为sqlite3 v4.0.2,因此请升级至该版本或更高版本,重新安装,然后在撰写本文时,您将使用sqlite3的最新版本,其中包含解决方案解决您的问题。

所有这些,查看您的错误消息,看来您的PATH上没有sqlite3

python

因此请尝试两种方法-升级Gekko并确保Python在您的环境中已安装且可用。

答案 1 :(得分:0)

为我安装了sqlite 4.0.1而不是3.1.13