openvenues / node-postal

NodeJS bindings to libpostal for fast international address parsing/normalization
MIT License
222 stars 76 forks source link

Error in Windows while installing node-postal #26

Open ImrozKhan21 opened 4 years ago

ImrozKhan21 commented 4 years ago

fatal error C1083: Cannot open include file: 'libpostal/libpost al.h': No such file or directory [C:\libpostal\node_modules\node-postal\build\expand.vcxproj] parser.cc

Hi, I have followed all these steps below to install libpostal (C library in itself is working for me):

git clone https://github.com/openvenues/libpostal
cd libpostal
cp -rf windows/* ./
./bootstrap.sh
./configure --datadir=[...some dir with a few GB of space...]
make -j4
make install

But when now I am trying to do npm install openvenues/node-postal it is throwing the below error:

C:\libpostal>npm install openvenues/node-postal

> node-postal@1.0.0 install C:\libpostal\node_modules\node-postal
> (node-gyp rebuild) || (exit 0)

C:\libpostal\node_modules\node-postal>if not defined npm_config_node_gyp (node "C:\ProgramData\nvm\v10.13.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\ProgramData\nvm\v10.13.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  expand.cc
  win_delay_load_hook.cc
c:\libpostal\node_modules\node-postal\src\expand.cc(1): fatal error C1083: Cannot open include file: 'libpostal/libpost
al.h': No such file or directory [C:\libpostal\node_modules\node-postal\build\expand.vcxproj]
  parser.cc
  win_delay_load_hook.cc
c:\libpostal\node_modules\node-postal\src\parser.cc(1): fatal error C1083: Cannot open include file: 'libpostal/libpost
al.h': No such file or directory [C:\libpostal\node_modules\node-postal\build\parser.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\ProgramData\nvm\v10.13.0\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\nvm\\v10.13.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\libpostal\node_modules\node-postal
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN libpostal@1.0.0 No description
npm WARN libpostal@1.0.0 No repository field.

+ node-postal@1.0.0
updated 1 package and audited 46 packages in 20.363s
found 0 vulnerabilities

Node version: v10.13.0 image

HunterJS-bit commented 4 years ago

Does this have any update, because I'm experiencing simmilar issue