apache / apache/pulsar-client-node

npm install fails on win10

Đang mở
#122 12 bình luận 4 reaction 0 người được giao Xem trên GitHub
component/build triage/week-38
Ngôn ngữ chính
C++
Star
164
Fork
98
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I want inatall on win10 x64,but failed
```
PS D:\code\server> npm install pulsar-client -S

> pulsar-client@1.2.0 install D:\code\server\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.2.0-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for pulsar-client@1.2.0 and node@12.14.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
gyp: codezhidaoservernode_modulesnode-addon-apisrcnode_api.gyp not found (cwd: D:\code\server\node_modules\pulsar-client) while loading dependencies of 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:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
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=D:\\code\\zhidao\\server\\node_modules\\pulsar-client\\build\\Release\\libpulsar.node" "--module_name=libpulsar" "--module_path=D:\\code\\zhidao\\server\\node_modules\\pulsar-client\\build\\Release" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" "--python=C:\\Users\\Administrator\\.windows-build-tools\\python27\\python.exe"
gyp ERR! cwd D:\code\server\node_modules\pulsar-client
gyp ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
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=D:\code\server\node_modules\pulsar-client\build\Release\libpulsar.node --module_name=libpulsar --module_path=D:\code\server\node_modules\pulsar-client\build\Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=C:\Users\Administrator\.windows-build-tools\python27\python.exe' (1)
node-pre-gyp ERR! stack at ChildProcess. (D:\code\zhidao\server\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\code\\server\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\code\server\node_modules\pulsar-client
node-pre-gyp ERR! node -v v12.14.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=D:\code\server\node_modules\pulsar-client\build\Release\libpulsar.node --module_name=libpulsar --module_path=D:\code\server\node_modules\pulsar-client\build\Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=C:\Users\Administrator\.windows-build-tools\python27\python.exe' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Tái hiện npm install cho pulsar-client@1.2.0 trên Windows 10 với Node v12.14.0, sau đó kiểm tra đường dẫn cài đặt node-pre-gyp và binding.gyp liên quan đến tệp node-addon-api/src/node_api.gyp bị thiếu. So sánh URL của binary dựng sẵn bị lỗi với đầu ra của bản build fallback; hoàn thành khi package được cài đặt thành công trong môi trường đã báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp, node.js
Lĩnh vực
build-system
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
28/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.