吞噬不规则地被杀害 [英] gulp is Killed irregularly
问题描述
我在运行时遇到了一个问题,因为它在任务期间自杀。我没有做任何事情:
> gulp build
$ b [11:25:34]使用gulpfile /app/app-base/frontend/gulpfile.js
[11:25:34]开始'css-clean'.. 。
[11:25:34]开始'js-clean'...
[11:25:34] 5.99 ms后完成'css-clean'
[11:25: 34]开始'css-build'...
[11:25:34] 17 ms后完成'js-clean'
[11:25:34]开始'js-build'.. 。
[11:25:35] 888 ms完成'css-build'
[11:25:35]开始'css'...
[11:25:35]在13μs后完成'css'
死亡
npm ERR! app-frontend@0.0.1 build:`gulp build`
npm ERR!退出状态137
npm ERR!
npm ERR!在app-frontend@0.0.1构建脚本失败。
npm ERR!这很可能是app-frontend包
npm ERR!的问题!而不是npm本身。
npm ERR!告诉作者这在你的系统上失败了:
npm ERR! gulp build
npm ERR!您可以通过以下方式获得他们的信息:
npm ERR! npm所有者ls app-frontend
npm ERR!上面可能还有其他日志记录输出。
npm ERR!系统Linux 3.13.0-43-generic
npm ERR!命令/root/.nvm/v0.10.35/bin/node/root/.nvm/v0.10.35/bin/npmrunbuild
npm ERR! cwd / app / app-base / frontend
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!代码ELIFECYCLE
npm ERR!
npm ERR!附加的日志记录细节可以在以下位置找到:
npm ERR! /app/app-base/frontend/npm-debug.log
npm ERR!不好的代码0
这是我的js-build任务,它似乎是它的原因:
gulp.task('js-build',['js-clean'],function(){
return gulp
.src(PATHS.js.input)
.pipe(plumber())
.pipe(browserify({
transform:[
'reactify',
'envify',
],
}))
.pipe(重命名(PATHS.js.outputFile))
.pipe(uglify())
.pipe(gulp.dest(PATHS.js.output));
});
如果我删除uglify,它将会更频繁地运行,但它不能100%运行。它可能与时间有关,似乎与此有关。
以下是npm-debug。 log:
1 0如果它以ok结尾,它就会工作
2 1详细cli ['/ root /。 nvm / v0.10.35 / bin / node',
3 1 verbose cli'/root/.nvm/v0.10.35/bin/npm',
4 1 verbose cli'start']
5 2信息使用npm@1.4.28
6 3信息使用node@v0.10.35
7 4详细run-script ['prestart','start','poststart']
8 5 info prestart app-base @
9 6信息启动app-base @
10 7生命周期中的详细unsafe-perm真
11 8 info app-base @执行启动脚本失败
12 9错误app-base @ start:`。/ scripts / start.sh`
13 9错误退出状态1
14 10错误在应用程序库@启动脚本失败。
15 10错误这很可能是应用程序包的问题,
16 10错误与npm本身不同。
17 10错误告诉作者,你的系统失效:
18 10错误./scripts/start.sh
19 10错误您可以通过以下方式获取他们的信息:
20 10错误npm owner ls app-base
21 10错误上面可能有其他日志输出。
22 11错误系统Linux 3.13.0-43-generic
23 12错误命令/root/.nvm/v0.10.35/bin/node/root/.nvm/v0.10.35/ bin / npmstart
24 13错误cwd / app / app-base
25 14错误节点-v v0.10.35
26 15错误npm -v 1.4.28
27 16错误代码ELIFECYCLE
28 17 verbose exit [1,true]
Killed
是由内核引起的,这是由于机器的内存用完了。这是在一台512Mb的虚拟机上完成的,内存不足以完成吞吐量的构建。我必须在另一台机器上进行捆绑,并将该代码作为解决方案转移到该机器上,而不是简单地给机器更多的内存,这也可以。希望帮助别人...... I have an issue when running gulp as it kills itself during the task. I'm not doing anything:
> gulp build
[11:25:34] Using gulpfile /app/app-base/frontend/gulpfile.js
[11:25:34] Starting 'css-clean'...
[11:25:34] Starting 'js-clean'...
[11:25:34] Finished 'css-clean' after 5.99 ms
[11:25:34] Starting 'css-build'...
[11:25:34] Finished 'js-clean' after 17 ms
[11:25:34] Starting 'js-build'...
[11:25:35] Finished 'css-build' after 888 ms
[11:25:35] Starting 'css'...
[11:25:35] Finished 'css' after 13 μs
Killed
npm ERR! app-frontend@0.0.1 build: `gulp build`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the app-frontend@0.0.1 build script.
npm ERR! This is most likely a problem with the app-frontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp build
npm ERR! You can get their info via:
npm ERR! npm owner ls app-frontend
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-43-generic
npm ERR! command "/root/.nvm/v0.10.35/bin/node" "/root/.nvm/v0.10.35/bin/npm" "run" "build"
npm ERR! cwd /app/app-base/frontend
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/app-base/frontend/npm-debug.log
npm ERR! not ok code 0
This is my js-build task which seem to be the cause of it:
gulp.task('js-build', ['js-clean'], function() {
return gulp
.src(PATHS.js.input)
.pipe(plumber())
.pipe(browserify({
transform: [
'reactify',
'envify',
],
}))
.pipe(rename(PATHS.js.outputFile))
.pipe(uglify())
.pipe(gulp.dest(PATHS.js.output));
});
It will work more often if I remove uglify but it doesn't work 100%. Could it be related to the time it takes, seems to be correlated to that.
Here is the npm-debug.log:
1 0 info it worked if it ends with ok
2 1 verbose cli [ '/root/.nvm/v0.10.35/bin/node',
3 1 verbose cli '/root/.nvm/v0.10.35/bin/npm',
4 1 verbose cli 'start' ]
5 2 info using npm@1.4.28
6 3 info using node@v0.10.35
7 4 verbose run-script [ 'prestart', 'start', 'poststart' ]
8 5 info prestart app-base@
9 6 info start app-base@
10 7 verbose unsafe-perm in lifecycle true
11 8 info app-base@ Failed to exec start script
12 9 error app-base@ start: `./scripts/start.sh`
13 9 error Exit status 1
14 10 error Failed at the app-base@ start script.
15 10 error This is most likely a problem with the app-base package,
16 10 error not with npm itself.
17 10 error Tell the author that this fails on your system:
18 10 error ./scripts/start.sh
19 10 error You can get their info via:
20 10 error npm owner ls app-base
21 10 error There is likely additional logging output above.
22 11 error System Linux 3.13.0-43-generic
23 12 error command "/root/.nvm/v0.10.35/bin/node" "/root/.nvm/v0.10.35/bin/npm" "start"
24 13 error cwd /app/app-base
25 14 error node -v v0.10.35
26 15 error npm -v 1.4.28
27 16 error code ELIFECYCLE
28 17 verbose exit [ 1, true ]
Unfortunately, Killed
is caused by the kernel and is due to the memory of the machine running out. This was done on a 512Mb Virtual Machine and the memory wasn't sufficient enough for doing gulp builds. I had to do the bundling on another machine and transfer that code to this machine as a work around instead of simply giving the machine more memory, that would work too. Hope that helped someone else...
这篇关于吞噬不规则地被杀害的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!