gpt4 book ai didi

node-gyp - node-gyp 的 [options] 记录在哪里?

转载 作者:行者123 更新时间:2023-12-02 22:04:22 27 4
gpt4 key购买 nike

node-gyp --help说:

Usage: node-gyp <command> [options]

where <command> is one of:
- build - Invokes `make` and builds the module
- clean - Removes any generated build files and the "out" dir
- configure - Generates a Makefile for the current module
- rebuild - Runs "clean", "configure" and "build" all at once
- install - Install node development files for the specified node version.
- list - Prints a listing of the currently installed node development files
- remove - Removes the node development files for the specified version

node-gyp@1.0.2 /usr/local/lib/node_modules/node-gyp
node@1.8.1

但是[options]在哪里?实际记录了吗?我挑选了各种 .js 源文件来尝试找出答案,但一无所获。

[options]只是传递给 gyp?

具体来说,我正在尝试使用一个未命名为“binding.gyp”的绑定(bind)文件,但由于某些困难,位于node.js和gyp之间的节点->Python包装器似乎不允许这样做-编码(尽我所能)。

例如:node-gyp configure custom.gyp产生:

<snip>
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp', <-- NOT OK
gyp info spawn args 'custom.gyp', <-- OK
<snip>
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/custom.gypi', <-- MAYBE OK? DON'T LIKE IT BEING GLOBAL (race condition here...)
<snip>
gyp: binding.gyp not found (cwd: <snip>) while trying to load binding.gyp
gyp ERR! configure error <-- YES because it doesn't exist, I want to use 'custom.gyp'
gyp ERR! stack Error: `gyp` failed with exit code: 1
<snip>

哪里<snip>只是代表我删除了不相关的信息。

也许我可以通过修改Python包装器本身来解决这个问题,但是还有其他方法吗?一些node-gyp --option=x例如?

最佳答案

看起来现在有相当多的文档在 node-gyp repo .

关于node-gyp - node-gyp 的 [options] 记录在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30182193/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com