Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. FROM node:8.1.3-alpine
  2.  
  3. RUN apk add --no-cache --update krb5-dev alpine-sdk python
  4.  
  5. RUN mkdir -p /usr/src/app
  6. WORKDIR /usr/src/app
  7.  
  8. COPY package.json /usr/src/app/
  9. RUN npm install
  10. COPY . /usr/src/app
  11.  
  12. EXPOSE 3000
  13.  
  14. CMD [ "npm", "start" ]
  15.  
  16. const { describe, it, before, after } = require('mocha');
  17. const request = require('supertest');
  18.  
  19. const app = require('../../../app.js');
  20. const User = require('../../../models/User');
  21.  
  22. const agent = request.agent(app);
  23. //some tests
  24.  
  25. the options [user] is not supported
  26. the options [pass] is not supported
  27.  
  28. require('dotenv').config();
  29.  
  30. const express = require('express');
  31. const path = require('path');
  32. const favicon = require('serve-favicon');
  33. const logger = require('morgan');
  34. const cookieParser = require('cookie-parser');
  35. const bodyParser = require('body-parser');
  36. const session = require('express-session');
  37. const mongoose = require('mongoose');
  38. const MongoStore = require('connect-mongo')(session);
  39.  
  40. const routes = require('./routes');
  41.  
  42. const app = express();
  43.  
  44. const URI = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test' ? 'mongodb://localhost/mulibwanji' : process.env.MONGODB_URI;
  45.  
  46. mongoose.connect(URI, { // In URI also I have user and pass as expected
  47. useMongoClient: true,
  48. user: 'login',
  49. pass: 'pass',
  50. });
  51.  
  52. 2017-07-10T18:53:49.796105113Z
  53. 2017-07-10T18:53:49.802949762Z
  54. 2017-07-10T18:53:49.814928711Z Local strategy authentication
  55. 2017-07-10T18:53:49.826690115Z Login
  56. 2017-07-10T18:53:51.226982330Z Segmentation fault (core dumped)
  57. 2017-07-10T18:53:51.258175441Z npm info lifecycle mulibwanji@0.0.0~test-prod: Failed to exec test-prod script
  58. 2017-07-10T18:53:51.258270885Z npm ERR! code ELIFECYCLE
  59. 2017-07-10T18:53:51.258406077Z npm ERR! errno 139
  60. 2017-07-10T18:53:51.258445569Z npm ERR! mulibwanji@0.0.0 test-prod: `mocha test/**/*`
  61. 2017-07-10T18:53:51.258519335Z npm ERR! Exit status 139
  62. 2017-07-10T18:53:51.258539503Z npm ERR!
  63. 2017-07-10T18:53:51.258579954Z npm ERR! Failed at the mulibwanji@0.0.0 test-prod script.
  64. 2017-07-10T18:53:51.258617042Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  65.  
  66. 0 info it worked if it ends with ok
  67. 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
  68. 2 info using npm@5.0.3
  69. 3 info using node@v8.1.3
  70. 4 verbose run-script [ 'prestart', 'start', 'poststart' ]
  71. 5 info lifecycle mulibwanji@0.0.0~prestart: mulibwanji@0.0.0
  72. 6 silly lifecycle mulibwanji@0.0.0~prestart: no script for prestart, continuing
  73. 7 info lifecycle mulibwanji@0.0.0~start: mulibwanji@0.0.0
  74. 8 verbose lifecycle mulibwanji@0.0.0~start: unsafe-perm in lifecycle true
  75. 9 verbose lifecycle mulibwanji@0.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/src/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  76. 10 verbose lifecycle mulibwanji@0.0.0~start: CWD: /usr/src/app
  77. 11 silly lifecycle mulibwanji@0.0.0~start: Args: [ '-c',
  78. 11 silly lifecycle 'npm run build && npm run test-prod && npm run lint && npm run update-schema && node ./bin/www' ]
  79. 12 silly lifecycle mulibwanji@0.0.0~start: Returned: code: 139 signal: null
  80. 13 info lifecycle mulibwanji@0.0.0~start: Failed to exec start script
  81. 14 verbose stack Error: mulibwanji@0.0.0 start: `npm run build && npm run test-prod && npm run lint && npm run update-schema && node ./bin/www`
  82. 14 verbose stack Exit status 139
  83. 14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
  84. 14 verbose stack at emitTwo (events.js:125:13)
  85. 14 verbose stack at EventEmitter.emit (events.js:213:7)
  86. 14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
  87. 14 verbose stack at emitTwo (events.js:125:13)
  88. 14 verbose stack at ChildProcess.emit (events.js:213:7)
  89. 14 verbose stack at maybeClose (internal/child_process.js:897:16)
  90. 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
  91. 15 verbose pkgid mulibwanji@0.0.0
  92. 16 verbose cwd /usr/src/app
  93. 17 verbose Linux 4.11.9-coreos
  94. 18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
  95. 19 verbose node v8.1.3
  96. 20 verbose npm v5.0.3
  97. 21 error code ELIFECYCLE
  98. 22 error errno 139
  99. 23 error mulibwanji@0.0.0 start: `npm run build && npm run test-prod && npm run lint && npm run update-schema && node ./bin/www`
  100. 23 error Exit status 139
  101. 24 error Failed at the mulibwanji@0.0.0 start script.
  102. 24 error This is probably not a problem with npm. There is likely additional logging output above.
  103. 25 verbose exit [ 139, true ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement