mocha-sidebar
mocha-sidebar copied to clipboard
Errors from Mocha side bar
____________________________________________________________________________
trying to searching for tests using these settings:
mocha path: /Users/sandy081/work/vscode/node_modules/mocha/index.js
test files location: test/**/*.js
files to ignore: **/.git/**/*,**/node_modules/**/*
environmets: {}
requires: []
options: {}
if you find anything wrong please change those default settings
____________________________________________________________________________
http://localhost:8887/
Error: Cannot find module 'electron'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/sandy081/work/vscode/test/electron/index.js:6:41)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at /Users/sandy081/work/vscode/node_modules/mocha/lib/mocha.js:220:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/Users/sandy081/work/vscode/node_modules/mocha/lib/mocha.js:217:14)
at Glob (/Users/sandy081/.vscode-insiders/extensions/maty.vscode-mocha-sidebar-0.20.26/lib/worker/findtests.js:86:15)
cant get tests Error: Mocha sidebar: Process exited with code 255. See Mocha output for more info.
So you don't want that the messages will pop up in case of errors ?
How does this error helps user and what does the user needs to be done to get this fixed?
The first is that you using electron as require and it was not installed . The second pop up an issue oops I'll fix it
@maty21 I am also running in to the cant find nyc locally and there is no setting for other path,Error: get-installed-path: module not found "nyc" in path
issue is there a workaround/fix for this issue?
I am using the 0.22.2 version from the Marketplace.
Try installing NYC as dev dependency or if coverage is not something that you need you can disable it from settings
On Wed, May 29, 2019, 8:49 PM Christian Vespa [email protected] wrote:
@maty21 https://github.com/maty21 I am also running in to the cant find nyc locally and there is no setting for other path,Error: get-installed-path: module not found "nyc" in path issue is there a workaround/fix for this issue?
I am using the 0.22.2 version from the Marketplace.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maty21/mocha-sidebar/issues/181?email_source=notifications&email_token=ABH6POKKZ5KYD3J2ZSKCSXDPX262TA5CNFSM4HO3BFZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWQD4BY#issuecomment-497040903, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH6POLG2DBDW26IDVHJDNDPX262TANCNFSM4HO3BFZA .
Same issue here. AFAICS, nyc
is included in the extension (I can see a ~/.vscode/extensions/maty.vscode-mocha-sidebar-0.22.2/node_modules/nyc
), so there should be no need to add it as dev dependency to every single project again?
Is this project dead? I'm exploring for a mocha comparable extension to some Jest stuff we use. This seems pretty inactive and this extension doesn't work. Installing nyc
just to see this thing in action didn't work either.
Or, any better extensions to use?
I too am having this problem.
I too am having this problem
Any updates about this issue?
This worked for me...
i looked for nyc binary path with which nyc
and then in mocha extension setting i set the path for the setting Nyc Path.
I am facing the same issue in Windows. Just installed VS Code and this extension.
side-bar: cant find nyc locally and there is no setting for other path,Error: get-installed-path: module not found "nyc" in path c:\Users\Orekav\Git\TestingNodeWithMocha\Module2\Demo\node_modules\nyc
I am also having this issue on Windows. Adding this setting to my settings.json
fixes it (thanks @imjaroiswebdev):
"mocha.nycPath": "~/.vscode/extensions/maty.vscode-mocha-sidebar-*/node_modules/nyc/bin/nyc"
It sets the mocha.nycPath
setting to the nyc
executable which is downloaded by this extension.
That path is in UNIX format, not Windows format, so I am guessing that it would work on Linux and MacOS too.
Since this fixes the problem, it appears that the problem is that the default value for this setting is incorrect. I am unfamiliar with building vscode extensions, so I could be wrong, but that is my best guess.
Still doesnt work.
Not working
After digging a little bit I realised that there is another extension that just works: https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter and seems to be actively maintained.