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

WebStorm IDE Instructions Not Working - Incorrect relative path prefix inserted in front of absolute paths causing Exit Code 1 #115

Closed
n8sabes opened this issue Feb 16, 2017 · 5 comments · Fixed by #160

Comments

@n8sabes
Copy link

n8sabes commented Feb 16, 2017

IDE Instructions for WebStorm 2017 do not seem to work, or I am configuring something incorrectly.

I have both VS Code, and npm command line working fine in bash shell, but need WebStorm due to better (live) debugger integration that currently possible in VS Code.

When running a debug session in WebStorm, it appears mocha-webpack is prefixing a relative path (./../../..) in front of absolute paths when trying to import modules.

ERROR OUTPUT:

WEBPACK  Compiling...

WEBPACK  Failed to compile with 1 error(s)

Error in ./~/mocha-webpack/lib/entry.js

Module not found: './../../../Users/n8/dev/project_workspace/test/model-tests/Widgets.test.ts' in '/Users/n8/dev/project_workspace/node_modules/mocha-webpack/lib'


Process finished with exit code 1
@zinserjan
Copy link
Owner

I can reproduce this, so your config should be ok.

Seems like loaderUtils.stringifiyRequest transforms the path wrong in

.map((file) => loaderUtils.stringifyRequest(this, file));

@n8sabes
Copy link
Author

n8sabes commented Feb 17, 2017

Glad you were able to reproduce it. Any suggested workarounds, or a fix anytime soon?

Using debugger statements in VS Code is seriously time consuming (e.g. inject debugger statement, re-run test which rebuilds everything, terminate, repeat...), whereas Webstorm breakpoints are much more efficient (especially in promise completion contexts), but now Webstorm isn't working either 😢.

Thanks for any suggestions.

@eddyerburgh
Copy link

Reverting to 0.x solves this for me

@pkuczynski
Copy link
Contributor

pkuczynski commented Jun 30, 2017

@eddyerburgh that's not really a solution, is it? :)

@n8sabes it works in Webstorm when you manually edit configuration and update test suite path to be relative. What a nightmare!

@pkuczynski
Copy link
Contributor

My PR #145 fixes the problem!

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

Successfully merging a pull request may close this issue.

4 participants