我试图让airpal继续前进并完成:
git clone https://github.com/airbnb/airpal.git
sudo apt-get install npm nodejs-legacy
./gradlew clean shadowJar
并收到以下消息:
:installAssets
> contextify@0.1.13 install /home/carl/presto/airpal/src/main/resources/assets/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
Usage: gyp_main.py [options ...] [build_file ...]
gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack at ChildProcess.onCpExit (/home/carl/.gradle/nodejs/node-v0.10.33-linux-
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "node" "/home/carl/.gradle/nodejs/node-v0.10.33-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/carl/presto/airpal/src/main/resources/assets/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! contextify@0.1.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.13 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
:installAssets FAILED
FAILURE: Build failed with an exception.
BUILD FAILED
我错过了什么?我有一些怀疑--no-parallel错误,并试图运行node-gyp rebuild得到一个binding.gyp文件找不到错误。问题结束。以下文字旨在满足SO的代码与细节比率。
我不熟悉node或node-gyp,所以我希望有人可以帮助我。我已经删除了大部分的堆栈跟踪以达到该比率,但我也担心通过删除过多来丢失上下文。
答案 0 :(得分:0)
似乎有一些人正在遇到这个问题或类似问题。查看这些可能有助于您解决问题的要点。 https://github.com/airbnb/airpal/issues/113
我在"browser-sync": "~2.6.5"
中修改了src/main/resources/assets/package.json
,这对我有用。
答案 1 :(得分:0)
首先,我在src/main/resources/assets/package.json
文件中没有“browser-sync”,但是我在“devDependencies”:{...}部分添加了它(并给它了“~2.6.5” “价值”。所以它看起来像这样:
...
"devDependencies": {
"babel-jest": "^4.0.0",
"babelify": "^5.0.3",
"browserify": "~13.0.0",
"browser-sync": "~2.6.5",
"browserify-shim": "~3.8.12",
...
其次,在运行sudo apt-get install npm nodejs-legacy
之后,您希望运行sudo ./gradlew clean shadowJar -Dairpal.useLocalNode
命令,而不是您指定的命令(下载自己的节点和npm软件包)。
还要确保首先正确安装了gradle,它位于PATH等中