Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mowatch fails to use local mocha #1

Open
chrishiestand opened this issue Nov 7, 2015 · 5 comments
Open

mowatch fails to use local mocha #1

chrishiestand opened this issue Nov 7, 2015 · 5 comments

Comments

@chrishiestand
Copy link

node version 4.2.2

to reproduce:

npm install -g mowatch
git clone [email protected]: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

@chrishiestand
Copy link
Author

as an aside, thanks for making this utility. I couldn't get gaze-cli to even approximately work right.

@boneskull
Copy link
Contributor

Maybe bin-path doesn't do what I think it does.

@boneskull
Copy link
Contributor

Re gaze-cli not working right: that's the precise reason this module was created. 😄

@timcash
Copy link

timcash commented Feb 4, 2016

Hey @chrishiestand I am having the same problem! Did anyone find a solution?

@chrishiestand
Copy link
Author

@timcash I'm just using global mocha. Probably this wouldn't be too hard to fix and PR if it was important to someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants