Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to require "process"

Tags:

travis-ci

Within my tests I'm attempting to use node.process. Everything works locally, but on travis-ci it is unable to find process. I haven't been able to find anything regarding this error or a solution for that matter.

Here's the error:

    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 [email protected] No license field.
    [email protected] node_modules/gulp-rename
    [email protected] node_modules/underscore
    [email protected] node_modules/chai
    ├── [email protected]
    └── [email protected] ([email protected])
    [email protected] node_modules/del
    ├── [email protected]
    ├── [email protected] ([email protected], [email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
    └── [email protected] ([email protected])
    [email protected] node_modules/mocha
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected], [email protected], [email protected])
    └── [email protected] ([email protected], [email protected])
    [email protected] node_modules/gulp-wrap-umd
    ├── [email protected] ([email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
    └── [email protected]
    [email protected] node_modules/gulp
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
    ├── [email protected]
    ├── [email protected] ([email protected], [email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
    └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
    [email protected] node_modules/gulp-uglify
    ├── [email protected]
    ├── [email protected] ([email protected], [email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
    └── [email protected] ([email protected], [email protected], [email protected], [email protected])
    0.81s$ npm test
    > [email protected] 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.
like image 506
hhsnopek Avatar asked May 23 '15 23:05

hhsnopek


1 Answers

Remove var process = require('process'); as process is already accessible without requiring it. This removes the require and solves the problem.

like image 171
hhsnopek Avatar answered Oct 14 '22 21:10

hhsnopek