Error: Could not locate the bindings file. Tried:
Using latest Wordpress version, exported just the Posts (from Tools->Export) and when trying to convert to JSON got the following error (npm and node are installed):
/home/test/wp2ghost-master/node_modules/bindings/bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
→ /home/test/wp2ghost-master/node_modules/node-expat/build/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/build/Debug/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/build/Release/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/out/Debug/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/Debug/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/out/Release/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/Release/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/build/default/node_expat.node
→ /home/test/wp2ghost-master/node_modules/node-expat/compiled/4.2.6/linux/x64/node_expat.node
at bindings (/home/test/wp2ghost-master/node_modules/bindings/bindings.js:88:9)
at Object.<anonymous> (/home/test/wp2ghost-master/node_modules/node-expat/lib/node-expat.js:4:32)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/test/wp2ghost-master/node_modules/xml-stream/lib/xml-stream.js:2:22)
at Module._compile (module.js:410:26)
Fixed the error by rebuilding (npm install) but for some reason the final output JSON file has duplicate posts (each post is 2 times in it)
I'm getting the same issue. I installed ghost 1.x in vagrant and then installed wp2ghost but npm install failed with: gyp ERR! node -v v8.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN wp2ghost@ No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
and running wp2ghost throws the same error as OP
That sounds like node can't build gyp. Perhaps you need to install Python?