You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by "Marappa Gounder, Subramaniyam" <SM...@StateStreet.com> on 2019/09/09 18:25:15 UTC

pulsar-client nodejs library

Information Classification: ** Limited Access

Hi,

I tried to install pulsar client for nodejs development.
https://www.npmjs.com/package/pulsar-client

First I got some issue which requires Python, So installed Python in my machine and setup PYTHON environment variable.

Then after that, I received below issues, Please help me out.

PS C:\Subu\Pulsar> node --version
v10.12.0
PS C:\Subu\Pulsar> npm --version
6.4.1
PS C:\Subu\Pulsar> npm i pulsar-client

> pulsar-client@1.0.0 install C:\Subu\Pulsar\node_modules\pulsar-client
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.0.0-node-v64-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for pulsar-client@1.0.0 and node@10.12.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:289:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Subu\\Pulsar\\node_modules\\pulsar-client\\build\\Release\\libpulsar.node" "--module_name=libpulsar" "--module_path=C:\\Subu\\Pulsar\\node_modules\\pulsar-client\\build\\Release" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" "--python=C:\\Python\\python.exe"
gyp ERR! cwd C:\Subu\Pulsar\node_modules\pulsar-client
gyp ERR! node -v v10.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release\libpulsar.node --module_name=libpulsar --module_path=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=C:\Python\python.exe' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Subu\Pulsar\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Subu\\Pulsar\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Subu\Pulsar\node_modules\pulsar-client
node-pre-gyp ERR! node -v v10.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release\libpulsar.node --module_name=libpulsar --module_path=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=C:\Python\python.exe' (1)
npm WARN enoent ENOENT: no such file or directory, open 'C:\Subu\Pulsar\package.json'
npm WARN Pulsar No description
npm WARN Pulsar No repository field.
npm WARN Pulsar No README data
npm WARN Pulsar No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pulsar-client@1.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pulsar-client@1.0.0 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\e588093\AppData\Roaming\npm-cache\_logs\2019-09-09T17_21_52_530Z-debug.log

Thanks,
Subu

Re: pulsar-client nodejs library

Posted by Guangning E <eg...@gmail.com>.
You can try Python 2.7. node-gyp does not seem to support python3 yet.
https://github.com/nodejs/node-gyp#on-windows

Marappa Gounder, Subramaniyam <SM...@statestreet.com> 于2019年9月10日周二
上午2:40写道:

> Information Classification: ** Limited Access
>
> Hi,
>
> I tried to install pulsar client for nodejs development.
> https://www.npmjs.com/package/pulsar-client
>
> First I got some issue which requires Python, So installed Python in my
> machine and setup PYTHON environment variable.
>
> Then after that, I received below issues, Please help me out.
>
> PS C:\Subu\Pulsar> node --version
> v10.12.0
> PS C:\Subu\Pulsar> npm --version
> 6.4.1
> PS C:\Subu\Pulsar> npm i pulsar-client
>
> > pulsar-client@1.0.0 install C:\Subu\Pulsar\node_modules\pulsar-client
> > node-pre-gyp install --fallback-to-build
>
> node-pre-gyp WARN Using request for node-pre-gyp https download
> node-pre-gyp WARN Tried to download(404):
> https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.0.0-node-v64-win32-x64.tar.gz
> node-pre-gyp
> <https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.0.0-node-v64-win32-x64.tar.gznode-pre-gyp>
> WARN Pre-built binaries not found for pulsar-client@1.0.0 and node@10.12.0
> (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
> gyp ERR! configure error
> gyp ERR! stack Error: Command failed: C:\Python\python.exe -c import sys;
> print "%s.%s.%s" % sys.version_info[:3];
> gyp ERR! stack   File "<string>", line 1
> gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
> gyp ERR! stack                                ^
> gyp ERR! stack SyntaxError: invalid syntax
> gyp ERR! stack
> gyp ERR! stack     at ChildProcess.exithandler (child_process.js:289:12)
> gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
> gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
> gyp ERR! stack     at Process.ChildProcess._handle.onexit
> (internal/child_process.js:251:5)
> gyp ERR! System Windows_NT 10.0.17134
> gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
> Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js"
> "configure" "--fallback-to-build"
> "--module=C:\\Subu\\Pulsar\\node_modules\\pulsar-client\\build\\Release\\libpulsar.node"
> "--module_name=libpulsar"
> "--module_path=C:\\Subu\\Pulsar\\node_modules\\pulsar-client\\build\\Release"
> "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0"
> "--node_napi_label=node-v64" "--python=C:\\Python\\python.exe"
> gyp ERR! cwd C:\Subu\Pulsar\node_modules\pulsar-client
> gyp ERR! node -v v10.12.0
> gyp ERR! node-gyp -v v3.8.0
> gyp ERR! not ok
> node-pre-gyp ERR! build error
> node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program
> Files\nodejs\node.exe C:\Program
> Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
> configure --fallback-to-build
> --module=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release\libpulsar.node
> --module_name=libpulsar
> --module_path=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release
> --napi_version=3 --node_abi_napi=napi --napi_build_version=0
> --node_napi_label=node-v64 --python=C:\Python\python.exe' (1)
> node-pre-gyp ERR! stack     at ChildProcess.<anonymous>
> (C:\Subu\Pulsar\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
> node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
> node-pre-gyp ERR! stack     at maybeClose
> (internal/child_process.js:962:16)
> node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit
> (internal/child_process.js:251:5)
> node-pre-gyp ERR! System Windows_NT 10.0.17134
> node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe"
> "C:\\Subu\\Pulsar\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install"
> "--fallback-to-build"
> node-pre-gyp ERR! cwd C:\Subu\Pulsar\node_modules\pulsar-client
> node-pre-gyp ERR! node -v v10.12.0
> node-pre-gyp ERR! node-pre-gyp -v v0.12.0
> node-pre-gyp ERR! not ok
> Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program
> Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
> configure --fallback-to-build
> --module=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release\libpulsar.node
> --module_name=libpulsar
> --module_path=C:\Subu\Pulsar\node_modules\pulsar-client\build\Release
> --napi_version=3 --node_abi_napi=napi --napi_build_version=0
> --node_napi_label=node-v64 --python=C:\Python\python.exe' (1)
> npm WARN enoent ENOENT: no such file or directory, open
> 'C:\Subu\Pulsar\package.json'
> npm WARN Pulsar No description
> npm WARN Pulsar No repository field.
> npm WARN Pulsar No README data
> npm WARN Pulsar No license field.
>
> npm ERR! code ELIFECYCLE
> npm ERR! errno 1
> npm ERR! pulsar-client@1.0.0 install: `node-pre-gyp install
> --fallback-to-build`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the pulsar-client@1.0.0 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\e588093\AppData\Roaming\npm-cache\_logs\2019-09-09T17_21_52_530Z-debug.log
>
> Thanks,
> Subu
>