You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/19 07:37:29 UTC

[GitHub] [pulsar-client-node] semi-xi opened a new issue, #226: install pulsar-client-node,but run node-pre-gyp install error

semi-xi opened a new issue, #226:
URL: https://github.com/apache/pulsar-client-node/issues/226

   | Info |  Note |
   | - | - |
   | System Info | Mac OS Monterey V12.4   Apple M1|
   | Node Info | 14.15.0 |
   
   before i install `pulsar-client-node`,I follow [pulsar-client doc](https://pulsar.apache.org/docs/client-libraries-cpp/#macos) and install that. it's no problem. but when i `npm install` in `pulsar-client-node`,it has something errors like this:
   ```
   npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
   
   > pulsar-client@1.7.0-rc.0 install /Users/jim/work/pulsar-client-node
   > node-pre-gyp install --fallback-to-build
   
   node-pre-gyp ERR! install response status 404 Not Found on https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.7.0-rc.0-node-v83-darwin-x64.tar.gz 
   node-pre-gyp WARN Pre-built binaries not installable for pulsar-client@1.7.0-rc.0 and node@14.15.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) 
   node-pre-gyp WARN Hit error response status 404 Not Found on https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.7.0-rc.0-node-v83-darwin-x64.tar.gz 
     CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
     LIBTOOL-STATIC Release/nothing.a
   env: python: No such file or directory
   make: *** [Release/nothing.a] Error 127
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/Users/jim/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
   gyp ERR! System Darwin 21.5.0
   gyp ERR! command "/Users/jim/.nvm/versions/node/v14.15.0/bin/node" "/Users/jim/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/jim/work/pulsar-client-node/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/Users/jim/work/pulsar-client-node/build/Release" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
   gyp ERR! cwd /Users/jim/work/pulsar-client-node
   gyp ERR! node -v v14.15.0
   gyp ERR! node-gyp -v v5.1.0
   gyp ERR! not ok 
   node-pre-gyp ERR! build error 
   node-pre-gyp ERR! stack Error: Failed to execute '/Users/jim/.nvm/versions/node/v14.15.0/bin/node /Users/jim/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jim/work/pulsar-client-node/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/jim/work/pulsar-client-node/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
   node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/jim/work/pulsar-client-node/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
   node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
   node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
   node-pre-gyp ERR! System Darwin 21.5.0
   node-pre-gyp ERR! command "/Users/jim/.nvm/versions/node/v14.15.0/bin/node" "/Users/jim/work/pulsar-client-node/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
   node-pre-gyp ERR! cwd /Users/jim/work/pulsar-client-node
   node-pre-gyp ERR! node -v v14.15.0
   node-pre-gyp ERR! node-pre-gyp -v v1.0.8
   node-pre-gyp ERR! not ok 
   Failed to execute '/Users/jim/.nvm/versions/node/v14.15.0/bin/node /Users/jim/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jim/work/pulsar-client-node/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/jim/work/pulsar-client-node/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
   npm ERR! code ELIFECYCLE
   npm ERR! errno 1
   npm ERR! pulsar-client@1.7.0-rc.0 install: `node-pre-gyp install --fallback-to-build`
   npm ERR! Exit status 1
   npm ERR! 
   npm ERR! Failed at the pulsar-client@1.7.0-rc.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!     /Users/jim/.npm/_logs/2022-07-19T07_18_58_446Z-debug.log
   
   ```
   
   
   when i update the node version to `16.16.0`, it solve。 but other project needs the node version in `14.x`.how can i solve this problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-node] aleixmorgadas commented on issue #226: install pulsar-client-node,but run node-pre-gyp install error

Posted by GitBox <gi...@apache.org>.
aleixmorgadas commented on issue #226:
URL: https://github.com/apache/pulsar-client-node/issues/226#issuecomment-1189849064

   @semi-xi, I ran into the same problem as you.
   
   I solved it this way:
   https://gist.github.com/aleixmorgadas/6b07a3b63c0538724503c642b04340b4
   
   In your scenario, I think might be an issue with the python version. You should be using python3.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] install pulsar-client-node,but run node-pre-gyp install error [pulsar-client-node]

Posted by "williamoliveira (via GitHub)" <gi...@apache.org>.
williamoliveira commented on issue #226:
URL: https://github.com/apache/pulsar-client-node/issues/226#issuecomment-1917492231

   Getting a similar error com node 12 and macos:
   
   Command: node-pre-gyp install --fallback-to-build && node GenCertFile.js
   Arguments: 
   Directory: /app/node_modules/pulsar-client
   Output:
   node-pre-gyp info it worked if it ends with ok
   node-pre-gyp info using node-pre-gyp@1.0.11
   node-pre-gyp info using node@12.22.12 | linux | arm64
   node-pre-gyp info check checked for "/app/node_modules/pulsar-client/lib/binding/pulsar.node" (not found)
   node-pre-gyp http GET https://archive.apache.org/dist/pulsar/pulsar-client-node/pulsar-client-node-1.9.0/napi-linux-glibc-arm64.tar.gz
   node-pre-gyp info install unpacking binding/pulsar.node
   node-pre-gyp info extracted file count: 1 
   node-pre-gyp info ok 
   [pulsar-client] Success: "/app/node_modules/pulsar-client/lib/binding/pulsar.node" is installed via remote
   /app/node_modules/pulsar-client/src/Client.js:60
       fs.rmSync(certsFilePath, { force: true });
          ^
   
   TypeError: fs.rmSync is not a function
       at Function.genCertFile (/app/node_modules/pulsar-client/src/Client.js:60:8)
       at Object.<anonymous> (/app/node_modules/pulsar-client/GenCertFile.js:22:8)
       at Module._compile (internal/modules/cjs/loader.js:999:30)
       at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
       at Module.load (internal/modules/cjs/loader.js:863:32)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] install pulsar-client-node,but run node-pre-gyp install error [pulsar-client-node]

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd commented on issue #226:
URL: https://github.com/apache/pulsar-client-node/issues/226#issuecomment-2063537568

   @


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] install pulsar-client-node,but run node-pre-gyp install error [pulsar-client-node]

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd closed issue #226: install pulsar-client-node,but run node-pre-gyp install error
URL: https://github.com/apache/pulsar-client-node/issues/226


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org