node-addon-api cannot be located during npm install

Đang mở
#80 8 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

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

Hướng nghiên cứu

Reproduce the failure from the hello world example's node-addon-api directory with npm install and node -p "require('node-addon-api').include"; inspect the binding.gyp reference and compare it with the working napi directory. Done means the dependency resolves during installation and the example can build successfully.

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

Mô tả

I am having a very strange bug. I am inside the node-addon-api dir of the hello world example and when I try to follow the instructions, I get a failure after command:
npm install

essentially it complains that it cannot find node-addon-api when the fline:
node -p "require('node-addon-api').include"
is executed to get the include dir for the binding.gyp file.

I am including the whole log for reference.

I have no idea why it's not able to find the module, sinc this error persists even when I insttall it directly:
npm install node-addon-api

I tried building the n-api dir and it worked no problem:
#inside napi dir
npm install
node-gyp rebuild
node ./
2019-01-12T19_08_43_417Z-debug.log

Ngôn ngữ chính
C++
Star
2.6k
Fork
602
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node-addon-examples

Tất cả issue của nodejs/node-addon-examples

Issue tương tự

Thêm issue về C++

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.