Skip to content

mowatch fails to use local mocha #1

Description

@chrishiestand

node version 4.2.2

to reproduce:

npm install -g mowatch
git clone git@github.com:Oakleon/node-template-project.git
cd node-template-project
npm install
mowatch test -w src
# save file src/index.js

output

mowatch: Watching test/*.js, src/*.js
module.js:339
    throw err;
    ^

Error: Cannot find module 'mocha'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.require.resolve (module.js:389:19)
    at binPath ($HOME/.nvm/versions/node/v4.2.2/lib/node_modules/mowatch/node_modules/bin-path/index.js:10:42)
    at Function.findMocha ($HOME/.nvm/versions/node/v4.2.2/lib/node_modules/mowatch/lib/index.js:24:19)
    at executeMocha ($HOME/.nvm/versions/node/v4.2.2/lib/node_modules/mowatch/lib/index.js:94:22)
    at Gaze.<anonymous> ($HOME/.nvm/versions/node/v4.2.2/lib/node_modules/mowatch/lib/index.js:85:7)
    at emitTwo (events.js:87:13)
    at Gaze.emit (events.js:172:7)
    at Gaze.emit ($HOME/.nvm/versions/node/v4.2.2/lib/node_modules/mowatch/node_modules/gaze/lib/gaze.js:129:32)
    at $HOME/.nvm/versions/node/v4.2.2/lib/node_modules/mowatch/node_modules/gaze/lib/gaze.js:415:16

if I npm install -g mocha then mowatch works as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions