我一直在尝试安装 npm node-openalpr 包,但我遇到了这个错误。我该如何克服这个问题?
> node-openalpr@1.1.1 install D:\My Codes\Thesis\node\node_modules\node-openalpr
> node-pre-gyp install --build-from-source --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: node-openalpr package.json is not node-pre-gyp ready:
node-pre-gyp ERR! stack package.json must declare these properties:
node-pre-gyp ERR! stack binary.host
node-pre-gyp ERR! stack at validate_config (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\versioning.js:220:15)
node-pre-gyp ERR! stack at Object.module.exports.evaluate (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\versioning.js:279:5)
node-pre-gyp ERR! stack at handle_gyp_opts (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\handle_gyp_opts.js:60:27)
node-pre-gyp ERR! stack at configure (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\configure.js:12:5)
node-pre-gyp ERR! stack at D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\build.js:43:13
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\My Codes\Thesis\node\node_modules\node-pre-gyp\lib\util\compile.js:85:9)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:311:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.19041
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\My Codes\\Thesis\\node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--build-from-source" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\My Codes\Thesis\node\node_modules\node-openalpr
node-pre-gyp ERR! node -v v12.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues>
npm WARN final_thesis@1.0.0 No description
npm WARN final_thesis@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! node-openalpr@1.1.1 install: `node-pre-gyp install --build-from-source --fallback-to-build`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the node-openalpr@1.1.1 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\MSI\AppData\Roaming\npm-cache\_logs\2020-07-06T19_34_07_841Z-debug.log
我听说有一个关于 node-pre-gyp 版本的问题,因为这个 openalpr 包已经 5 岁了。我该如何克服这个问题?