Closed louisjrdev closed 6 months ago
I will note on this, our CI is running on Linux.
I was also able to get this working locally using Node 18.18.0 but then in our CI moved to that version the same error happens, so perhaps this is not producable 100% of the time, but it is fairly consistently failing across the board.
@louisjrdev yes to be honest I could not reproduce on MacOS. I will try to get hold of a person on the team who has a windows machine, maybe they can repro. Sorry about that!
Also, this could be a bug on the Storybook side, since on Nx we're just directly invoking the Storybook test-runner. So any issue should be coming directly from there... Do you want to try and open an issue either on the Storybook test runner repo, or the Storybook repo?
Same here on Linux > NX Report complete - copy this into the issue template
Node : 18.18.0 OS : linux-x64 npm : 9.8.1
nx (global) : 16.10.0 nx : 16.10.0 @nx/js : 16.10.0 @nx/jest : 16.10.0 @nx/linter : 16.10.0 @nx/workspace : 16.10.0 @nx/cypress : 16.10.0 @nx/devkit : 16.10.0 @nx/eslint-plugin : 16.10.0 @nx/next : 16.10.0 @nx/playwright : 16.10.0 @nx/react : 16.10.0 @nx/storybook : 16.10.0 @nrwl/tao : 16.10.0 @nx/vite : 16.10.0 @nx/web : 16.10.0 typescript : 5.1.6
Thanks @kfern for reporting this! I am pretty sure this is an issue with test-runner, so thanks for creating an issue there!
FYI, the problem is with npm
handling dependencies, not storybook or nx:
https://github.com/storybookjs/test-runner/issues/366#issuecomment-1801762421
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! 🙏
I will be closing this now, but feel free to reopen if you verify that it's an issue with Nx (which it seems that it is not)!
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
nx run componentlibrary:test-storybook
the test suite failed to run with error:TypeError: this._resolver.getGlobalPaths is not a function
See screenshot of error from console:
Expected Behavior
Storybook tests should run without error.
GitHub Repo
https://github.com/louisjrdev/nxstorybooktestbug
Steps to Reproduce
npm install
to install dependenciesnx run componentlibrary:storybook
nx run componentlibrary:test-storybook
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
This issue was initially only happening in our production repo on CI builds and not locally, but was able to reproduce the issue locally in a new repo and workspace.