在我的测试中,我正在尝试使用node.process
。一切都在本地工作,但在travis-ci上找不到process
。我无法找到有关此错误或解决方案的任何内容。
这是错误:
Using worker: worker-linux-docker-6b895d82.prod.travis-ci.org:travis-linux-5
system_info
Build system information
Build language: node_js
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"
git.checkout
0.10s$ git clone --depth=50 --branch=master git://github.com/hhsnopek/pourover.git hhsnopek/pourover
Cloning into 'hhsnopek/pourover'...
remote: Counting objects: 288, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 288 (delta 12), reused 0 (delta 0), pack-reused 254
Receiving objects: 100% (288/288), 478.34 KiB | 0 bytes/s, done.
Resolving deltas: 100% (147/147), done.
Checking connectivity... done.
$ cd hhsnopek/pourover
$ git checkout -qf c0c7d70cadcba962828c277806017ef4c344aa24
This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See http://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
1.04s$ nvm install node
######################################################################## 100.0%
Now using node v0.12.4
$ node --version
v0.12.4
$ npm --version
2.10.1
$ nvm --version
0.23.3
install
12.24s$ npm install
npm WARN package.json pourover@1.1.0 No license field.
gulp-rename@1.2.2 node_modules/gulp-rename
underscore@1.8.3 node_modules/underscore
chai@2.3.0 node_modules/chai
├── assertion-error@1.0.0
└── deep-eql@0.1.3 (type-detect@0.1.1)
del@0.1.3 node_modules/del
├── is-path-cwd@1.0.0
├── each-async@1.1.1 (set-immediate-shim@1.0.1, onetime@1.0.0)
├── is-path-in-cwd@1.0.0 (is-path-inside@1.0.0)
├── globby@0.1.1 (array-differ@0.1.0, array-union@0.1.0, async@0.9.2, glob@4.5.3)
└── rimraf@2.3.4 (glob@4.5.3)
mocha@2.2.5 node_modules/mocha
├── escape-string-regexp@1.0.2
├── supports-color@1.2.1
├── growl@1.8.1
├── commander@2.3.0
├── diff@1.4.0
├── debug@2.0.0 (ms@0.6.2)
├── mkdirp@0.5.0 (minimist@0.0.8)
├── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)
└── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
gulp-wrap-umd@0.2.1 node_modules/gulp-wrap-umd
├── through2@0.5.1 (xtend@3.0.0, readable-stream@1.0.33)
├── gulp-util@2.2.20 (lodash._reinterpolate@2.4.1, minimist@0.2.0, chalk@0.5.1, vinyl@0.2.3, lodash.template@2.4.1, multipipe@0.1.2, dateformat@1.0.11)
└── lodash@2.4.2
gulp@3.8.11 node_modules/gulp
├── pretty-hrtime@0.2.2
├── interpret@0.3.10
├── deprecated@0.0.1
├── archy@1.0.0
├── minimist@1.1.1
├── tildify@1.0.0 (user-home@1.1.1)
├── v8flags@2.0.5 (user-home@1.1.1)
├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
├── semver@4.3.4
├── orchestrator@0.3.7 (sequencify@0.0.7, stream-consume@0.1.0, end-of-stream@0.1.5)
├── liftoff@2.1.0 (extend@2.0.1, rechoir@0.6.1, flagged-respawn@0.3.1, resolve@1.1.6, findup-sync@0.2.1)
├── gulp-util@3.0.4 (array-differ@1.0.0, beeper@1.0.0, object-assign@2.0.0, array-uniq@1.0.2, lodash._reinterpolate@3.0.0, lodash._reescape@3.0.0, lodash._reevaluate@3.0.0, replace-ext@0.0.1, vinyl@0.4.6, chalk@1.0.0, lodash.template@3.6.0, through2@0.6.5, multipipe@0.1.2, dateformat@1.0.11)
└── vinyl-fs@0.3.13 (graceful-fs@3.0.7, strip-bom@1.0.0, defaults@1.0.2, vinyl@0.4.6, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)
gulp-uglify@1.2.0 node_modules/gulp-uglify
├── deap@1.0.0
├── through2@0.6.5 (xtend@4.0.0, readable-stream@1.0.33)
├── vinyl-sourcemaps-apply@0.1.4 (source-map@0.1.43)
├── gulp-util@3.0.4 (array-differ@1.0.0, object-assign@2.0.0, beeper@1.0.0, array-uniq@1.0.2, lodash._reevaluate@3.0.0, lodash._reinterpolate@3.0.0, lodash._reescape@3.0.0, replace-ext@0.0.1, minimist@1.1.1, vinyl@0.4.6, chalk@1.0.0, lodash.template@3.6.0, multipipe@0.1.2, dateformat@1.0.11)
└── uglify-js@2.4.19 (uglify-to-browserify@1.0.2, async@0.2.10, source-map@0.1.34, yargs@3.5.4)
0.81s$ npm test
> pourover@1.1.0 test /home/travis/build/hhsnopek/pourover
> mocha
module.js:338
throw err;
^
Error: Cannot find module 'process'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/travis/build/hhsnopek/pourover/test/test.js:2:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /home/travis/build/hhsnopek/pourover/node_modules/mocha/lib/mocha.js:192:27
at Array.forEach (native)
at Mocha.loadFiles (/home/travis/build/hhsnopek/pourover/node_modules/mocha/lib/mocha.js:189:14)
at Mocha.run (/home/travis/build/hhsnopek/pourover/node_modules/mocha/lib/mocha.js:422:31)
at Object.<anonymous> (/home/travis/build/hhsnopek/pourover/node_modules/mocha/bin/_mocha:398:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Test failed. See above for more details.
The command "npm test" exited with 1.
Done. Your build exited with 1.
答案 0 :(得分:6)
删除var process = require('process');
,因为无需进程即可访问该进程。这将删除需求并解决问题。