wp2ghost icon indicating copy to clipboard operation
wp2ghost copied to clipboard

Error: Could not locate the bindings file. Tried:

Open shubhank008 opened this issue 8 years ago • 3 comments

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)

shubhank008 avatar Jul 06 '17 11:07 shubhank008

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)

shubhank008 avatar Jul 06 '17 13:07 shubhank008

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

cstcyr avatar Dec 28 '18 17:12 cstcyr

That sounds like node can't build gyp. Perhaps you need to install Python?

jonhoo avatar Dec 29 '18 16:12 jonhoo