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

Custom reporters not allowed from cli #415

Closed
geek opened this issue Aug 4, 2015 · 5 comments · Fixed by #416
Closed

Custom reporters not allowed from cli #415

geek opened this issue Aug 4, 2015 · 5 comments · Fixed by #416
Assignees
Labels
bug Bug or defect
Milestone

Comments

@geek
Copy link
Member

geek commented Aug 4, 2015

Need to allow custom reporters to be allowed by the CLI, as reported by the readme

@geek geek added the bug Bug or defect label Aug 4, 2015
@geek geek self-assigned this Aug 4, 2015
@geek geek added this to the 5.14.1 milestone Aug 4, 2015
@geek geek closed this as completed in #416 Aug 4, 2015
@PizzaBrandon
Copy link

Sorry to bother on a closed ticket, but I'm not sure if what I'm dealing with is a related bug or if I'm using this incorrectly.

I just wrote and published a Lab reporter for Bamboo, installed it locally on a package I'm attempting to test, installed lab globally (verified it's 5.15.1), and ran lab -r lab-bamboo-reporter. It gave me the following error:

~/workspaces/project-under-test$ lab -r lab-bamboo-reporter
module.js:338
    throw err;
          ^
Error: Cannot find module 'lab-bamboo-reporter'
    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.internals.requireReporter (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/reporters/index.js:34:12)
    at Object.exports.generate (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/reporters/index.js:59:65)
    at Object.exports.report (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/runner.js:58:30)
    at Object.exports.run (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/lib/cli.js:49:19)
    at Object.<anonymous> (/Users/###/.nvm/versions/node/v0.12.7/lib/node_modules/lab/bin/lab:3:23)
    at Module._compile (module.js:460:26)
    ...

But if I run lab -r ./node_modules/lab-bamboo-reporter, it succeeds.

Am I reading the usage instructions wrong and lab expects the plugin to be installed globally or is this a bug in the implementation?

@geek
Copy link
Member Author

geek commented Aug 20, 2015

Interesting. What if you install locally and run lab? I like to avoid global installs and just use the local binaries. If you don't have the path setup for ./node_modules/.bin then you can run as:

./node_modules/.bin/lab -r lab-bamboo-reporter

I wonder if this is an issue with the global install not respecting the current working directory.

@PizzaBrandon
Copy link

$ ./node_modules/.bin/lab -r lab-bamboo-reporter gives the correct test result output.

@PizzaBrandon
Copy link

I will amend my package's usage instructions to match this requirement, but I do hope you are able to find a solution that allows the global install to also work since the readme recommends it as a best practice.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants