Sunday, 28 May 2017

Node.js module failing to install

I want to install this node library on windows 10 but I get this

https://www.npmjs.com/package/node-prolog-swi

https://github.com/kloni/node-prolog-swi

I also set SWI_HOME_DIR to be C:\Program Files\swipl\bin. This is the directory that has the exe for the prolog.

C:\Users\me\Desktop\Apps\web>npm install swipl

> swipl@1.0.3 install C:\Users\me\Desktop\Apps\web\node_modules\swipl
> node-gyp rebuild


C:\Users\me\Desktop\Apps\web\node_modules\swipl>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
'swipl' is not recognized as an internal or external command,
operable program or batch file.
child_process.js:524
    throw err;
    ^

Error: Command failed: swipl --dump-runtime-variables=sh
'swipl' is not recognized as an internal or external command,
operable program or batch file.

    at checkExecSyncError (child_process.js:481:13)
    at execSync (child_process.js:521:13)
    at Object.exports.dump (C:\Users\me\Desktop\Apps\web\node_modules\swipl\lib\runtime_vars.js:7:20)
    at Object.<anonymous> (C:\Users\me\Desktop\Apps\web\node_modules\swipl\scripts\runtime_var.js:10:26)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
gyp: Call to 'node scripts/runtime_var.js PLARCH' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:308:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\me\Desktop\Apps\web\node_modules\swipl
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\me\Desktop\Apps\web\package.json'
npm WARN web No description
npm WARN web No repository field.
npm WARN web No README data
npm WARN web No license field.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "swipl"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! swipl@1.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the swipl@1.0.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the swipl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs swipl
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls swipl
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\me\AppData\Roaming\npm-cache\_logs\2017-05-28T14_03_17_376Z-debug.log

Does anyone know what is the problem?

Thanks



via omega

No comments:

Post a Comment