Closed burgerwagon closed 3 years ago
Please verify with the latest release of Nx 11 and reopen if necessary. I wonder if this is Windows-specific as I was not able to reproduce on OSX and WebStorm 2020.1
In case the original author doesn't respond, this is still an issue with latest release of Nx 11, I am unable to run the tests in WebStorm. It seems to be Windows specific as my colleague that uses a Mac doesn't have this problem.
Thanks @baltie
Thanks @baltie. Yes we are on Windows and is still an issue
I have the same issue on a Mac:
after upgrading from nx10 to nx11
The error:
Error: Cannot find module '/Users/xxxx/Development/something/"/Users/xxxx/Library/Application Support/JetBrains/Toolbox/apps/WebStorm/ch-0/203.7148.54/WebStorm.app/Contents/plugins/js-karma/js_reporter/karma-intellij/lib/intellij.conf.js"'
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
When running a karma test from within Webstorm it fails with the error
Debugging further i can see that in .\node_modules\@angular-devkit\build-angular\src\karma\index.js:91 the following line sets up the path
karmaOptions.configFile = path_1.resolve(context.workspaceRoot, options.karmaConfig);
The path in the options.karmaConfig is getting passed in wrapped in quotes. This is causing path.resolve to not recognise this as an absolute url and just appends it to the workspaceRoot. The resulting url is the one from the error above. This does not happen before nx is added to the project.
This error seems to be caused by the decorating of ng-cli. If i remove node_modules and remove the call to
node ./decorate-angular-cli.js
from the postinstall in package.json and then do another npm install the problem does not occurExpected Behavior
I expect the tests to execute successfully from within webstorm
Steps to Reproduce
I'm using Webstorm 2020.1 and have @angular/cli@11.0.5 installed globally
I can reproduce the error with these minimal steps
ng new js-karma-path-issue
ng add @nrwl/workspace
Failure Logs
Environment
Node : 10.16.0 OS : win32 x64 npm : 6.9.0
nx : Not Found @nrwl/angular : 11.0.18 @nrwl/cli : 11.0.18 @nrwl/cypress : 11.0.18 @nrwl/devkit : 11.0.18 @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : 11.0.18 @nrwl/linter : 11.0.18 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 11.0.18 @nrwl/web : Not Found @nrwl/workspace : 11.0.18 typescript : 4.0.5