2015-02-03 13 views
6

Tôi gặp vấn đề khi chạy gulp vì nó tự chết trong khi thực hiện nhiệm vụ. Tôi không làm bất cứ điều gì:gulp bị giết bất thường

> 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! [email protected] build: `gulp build` 
npm ERR! Exit status 137 
npm ERR! 
npm ERR! Failed at the [email protected] 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 

Đây là tôi js-xây dựng nhiệm vụ mà dường như là nguyên nhân của nó:

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));          
}); 

Nó sẽ làm việc thường xuyên hơn nếu tôi có thể ngưng làm xấu đi nhưng nó doesn' t làm việc 100%. Nó có thể liên quan đến thời gian cần thiết, có vẻ như tương quan với điều đó.


Đây là 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 [email protected] 
6 3 info using [email protected] 
7 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 
8 5 info prestart [email protected] 
9 6 info start [email protected] 
10 7 verbose unsafe-perm in lifecycle true 
11 8 info [email protected] Failed to exec start script 
12 9 error [email protected] start: `./scripts/start.sh` 
13 9 error Exit status 1 
14 10 error Failed at the [email protected] 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 ] 
+0

Chia sẻ mục này .... - '/ app/app-base/frontend/npm-debug.log' –

+0

Nó không nói gì nhiều hơn những gì nhật ký bảng điều khiển đang nói nhưng chắc chắn. Hãy cho tôi một giây .. –

+0

đã thêm tệp nom-debug.log. –

Trả lời

17

Thật không may, Killed được gây ra bởi hạt nhân và là do bộ nhớ của máy chạy ra ngoài. Điều này đã được thực hiện trên một máy ảo 512Mb và bộ nhớ không đủ để thực hiện các bản dựng gulp. Tôi phải làm bó trên một máy khác và chuyển mã đó vào máy này như một công việc thay vì chỉ đơn giản là cho máy bộ nhớ nhiều hơn, điều đó cũng sẽ hoạt động. Hy vọng rằng đã giúp đỡ người khác ...

+0

thậm chí không tăng cường hoán đổi của bạn? – sourRaspberri

1

Tôi gặp phải cùng một vấn đề. Tôi có một máy chủ ram 1 GB và quá trình nuốt chửng đã bị giết. Tôi vô hiệu hóa bất kỳ nhiệm vụ linting trong chế độ sản xuất mà giảm tiêu thụ bộ nhớ khá một chút.

Các vấn đề liên quan