`yarn` build fails on initial install
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
So I tried to pull this project today and install it for the first time, and I got an error while running yarn.
[-/5] ⠁ waiting...
[-/5] ⠁ waiting...
[-/5] ⠁ waiting...
error /Users/Christopher/Code/reactjs.org/node_modules/sharp: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/Christopher/Code/reactjs.org/node_modules/sharp
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@10.1.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/10.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/Christopher/Code/reactjs.org/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/10.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/Christopher/.node-gyp/10.1.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/Christopher/.node-gyp/10.1.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/10.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/Christopher/.node-gyp/10.1.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/Christopher/Code/reactjs.org/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:22:
In file included from ../../nan/nan.h:192:
../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../src/common.cc:22:
../../nan/nan.h:834:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/common.cc:22:
../../nan/nan.h:849:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/common.cc:22:
../../nan/nan.h:864:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../src/common.cc:22:
../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/Christopher/.node-gyp/10.1.0/include/node/node.h:88:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
4 warnings and 1 error generated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/10.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/Cellar/node/10.1.0/bin/node" "/usr/local/Cellar/node/10.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Christopher/Code/reactjs.org/node_modules/sharp
Here's my node version:
> Christopher@Tamiasiii: ~/Code/reactjs.org> node --version
v10.1.0
This similar issue from mattermost seems like it was resolved by bumping the nan version.
I'd make a PR to do that but TBH I'm really out of my depth here. I can't even find where that would be done
https://github.com/mattermost/mattermost-server/issues/8708
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện quá trình cài đặt yarn ban đầu và kiểm tra đường dẫn build của node_modules/sharp, bao gồm binding.gyp, src/common.cc và nan.h được tham chiếu. Issue được hoàn tất khi quá trình cài đặt sạch hoàn thành mà không gặp lỗi node-gyp rebuild trên Node 10.1.0.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100