Reputation: 109
I am using npm i node-openalpr to install , but i am getting error like :
node-pre-gyp WARN Using request 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 (C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\versioning.js:220:15) node-pre-gyp ERR! stack at Object.module.exports.evaluate (C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\versioning.js:279:5) node-pre-gyp ERR! stack at handle_gyp_opts (C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\handle_gyp_opts.js:60:27) node-pre-gyp ERR! stack at configure (C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\configure.js:12:5) node-pre-gyp ERR! stack at C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\build.js:43:13 node-pre-gyp ERR! stack at ChildProcess. (C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\lib\util\compile.js:85:9) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Sahal KA\ANPR\node_modules\node-openalpr\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--build-from-source" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Sahal KA\ANPR\node_modules\node-openalpr node-pre-gyp ERR! node -v v8.11.3 node-pre-gyp ERR! node-pre-gyp -v v0.11.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 ERR! code ELIFECYCLE npm ERR! errno 7 npm ERR! [email protected] install:node-pre-gyp install --build-from-source --fallback-to-build
npm ERR! Exit status 7 npm ERR! npm ERR! Failed at the [email protected] 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\ADMIN\AppData\Roaming\npm-cache_logs\2018-10-22T08_18_59_445Z-debug.log
Upvotes: 0
Views: 968
Reputation: 823
The version of node-pre-gyp
used in the node-openalpr
module points to the node-pre-gyp
repo, meaning that on install it will try to use the most up to date version of node-pre-gyp
which is far newer than the version used in the node-openalpr
module.
There is a fork of the node-openalpr
module which specifies a commit hash for node-pre-gyp
in the package.json
like so:
"node-pre-gyp": "https://github.com/mapbox/node-pre-gyp.git#8036d17"
this can be found here :
https://github.com/bameyrick/node-openalpr
and can be added to your project using yarn add https://github.com/bameyrick/node-openalpr
How to install module directly from GitHub if you prefer using npm - https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly
Upvotes: 0