“ time npm run coverage”试图运行“ grunt karma --coverage”并在docker内部失败

时间:2019-03-20 10:31:37

标签: docker npm phantomjs dockerfile karma-coverage

尝试运行grunt karma --coverage时,--p失败

    PhantomJS 2.1.1 (Linux 0.0.0) ERROR
    ReferenceError: Can't find variable: angular
    at resources/js/modules/logout.js:9

    (node:1082) MaxListenersExceededWarning: Possible EventEmitter 
     memory leak detected. 11 close listeners added. Use 
     emitter.setMaxListeners() to increase limit
     Warning: Task "karma:unit" failed. Use --force to continue.

     Aborted due to warnings.

我正在尝试在Dockerfile中运行它,并将基础映像用作dockerhub的node:10.15.3。

   10 silly lifecycle cvp@0.5.0-beta~coverage: Args: [ '-c', 'grunt 
   karma --coverage' ]
   11 silly lifecycle cvp@0.5.0-beta~coverage: Returned: code: 3  
   signal: null
   12 info lifecycle cvp@0.5.0-beta~coverage: Failed to exec coverage 
   script
   13 verbose stack Error: cvp@0.5.0-beta coverage: `grunt karma -- 
   coverage`
   13 verbose stack Exit status 3
   13 verbose stack     at EventEmitter.<anonymous> 
   (/usr/local/lib/node_modules/npm/node_modules/npm- 
   lifecycle/index.js:301:16)
   13 verbose stack     at EventEmitter.emit (events.js:189:13)
   13 verbose stack     at ChildProcess.<anonymous> 
   (/usr/local/lib/node_modules/npm/node_modules/npm- 
   lifecycle/lib/spawn.js:55:14)
   13 verbose stack     at ChildProcess.emit (events.js:189:13)
   13 verbose stack     at maybeClose 
   (internal/child_process.js:970:16)
   13 verbose stack     at Process.ChildProcess._handle.onexit 
   (internal/child_process.js:259:5)
   14 verbose pkgid cvp@0.5.0-beta
   15 verbose cwd /cvp-frontend
   16 verbose Linux 4.9.76-10730782.AroraKernel49.1.fc18.x86_64
   17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" 
   "coverage"
   18 verbose node v10.15.3
   19 verbose npm  v6.4.1

有人知道发生了什么吗?任何帮助将不胜感激。

0 个答案:

没有答案