我正尝试在具有代理设置的虚拟机上使用节点红色UI安装“ node-red-node-sqlite”,这会引发错误消息。我可以在VM上安装其他节点。
我已经安装了python v2.7.6; nodejs v10.16.3; npm 6.9.0;虚拟机上的nvm v1.1.7;我在台式机(npm v6.11.3)上有类似的设置,并且工作正常;但是在另一个数据中心中具有代理设置的VM上,它的node-sqlite安装失败
我正在按照步骤 1. npm i --unsafe-perm node-red-node-sqlite 2. cd〜/ .node-red 3. npm重建
PS C:\ Users \ userid.node-red> npm i --unsafe-perm node-red-node-sqlite
> sqlite3@4.1.0 install C:\Users\userid\.node-red\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for
sqlite3@4.1.0 and node@10.16.3 (node-v64 ABI, unknown) (falling back
to source compile with node-gyp) node-pre-gyp WARN Hit error
getaddrinfo ENOTFOUND mapbox-node-binary.s3.amazonaws.com
mapbox-node-binary.s3.amazonaws.com:443 gyp WARN install got an
error, rolling back install gyp ERR! configure error gyp ERR! stack
Error: This is most likely not a problem with node-gyp or the
package itself and gyp ERR! stack is related to network
connectivity. In most cases you are behind a proxy or have bad gyp
ERR! stack network settings. gyp ERR! stack at
Request.<anonymous>
(C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\lib\install.js:197:21) gyp ERR! stack at Request.emit (events.js:198:13) gyp ERR! stack
at Request.onRequestError
(C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\request\request.js:881:8)
gyp ERR! stack at ClientRequest.emit (events.js:198:13) gyp ERR!
stack at TLSSocket.socketErrorListener (_http_client.js:392:9)
gyp ERR! stack at TLSSocket.emit (events.js:198:13) gyp ERR!
stack at emitErrorNT (internal/streams/destroy.js:91:8) gyp ERR!
stack at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
gyp ERR! stack at process._tickCallback
(internal/process/next_tick.js:63:19) gyp ERR! System Windows_NT
10.0.14393 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\nvm\\v10.16.3\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build"
"--module=C:\\Users\\userid\\.node-red\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64\\node_sqlite3.node"
"--module_name=node_sqlite3"
"--module_path=C:\\Users\\userid\\.node-red\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64"
"--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v64" gyp ERR! cwd
C:\Users\userid\.node-red\node_modules\sqlite3 gyp ERR! node -v
v10.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp
ERR! build error node-pre-gyp ERR! stack Error: Failed to execute
'C:\Program Files\nodejs\node.exe
C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous>
(C:\Users\userid\.node-red\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose
(internal/child_process.js:982:16) node-pre-gyp ERR! stack at
Process.ChildProcess._handle.onexit
(internal/child_process.js:259:5) node-pre-gyp ERR! System
Windows_NT 10.0.14393 node-pre-gyp ERR! command "C:\\Program
Files\\nodejs\\node.exe"
"C:\\Users\\userid\\.node-red\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp"
"install" "--fallback-to-build" node-pre-gyp ERR! cwd
C:\Users\userid\.node-red\node_modules\sqlite3 node-pre-gyp ERR!
node -v v10.16.3 node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok Failed to execute 'C:\Program
Files\nodejs\node.exe
C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3@4.1.0 install: `node-pre-gyp install
--fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.1.0 install script. npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\userid\AppData\Roaming\npm-cache\_logs\2019-10-21T15_57_41_109Z-debug.log
PS C:\Users\userid\.node-red>
======================= 当我尝试安装“ npm install --global --production Windows-build-tools” 时,出现错误=>
4115 verbose stack Error: windows-build-tools@5.2.2 postinstall: `node ./dist/index.js`
4115 verbose stack Exit status 1
4115 verbose stack at EventEmitter.<anonymous> (C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
4115 verbose stack at EventEmitter.emit (events.js:198:13)
4115 verbose stack at ChildProcess.<anonymous> (C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
4115 verbose stack at ChildProcess.emit (events.js:198:13)
4115 verbose stack at maybeClose (internal/child_process.js:982:16)
4115 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
4116 verbose pkgid windows-build-tools@5.2.2
4117 verbose cwd C:\windows\system32\windowspowershell\v1.0