You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that when running tests for a Storybook managed in a separate package, with a package.json that only includes @storybook/test-runner, concurrently, and wait-on as dependencies, an error occurs stating Error: Cannot find module 'detect-package-manager'.
I suspect this error is due to detect-package-manager being included in the devDependencies of @storybook/test-runner, rather than in its dependencies.
The version of @storybook/test-runner being used is 0.16.0.
The text was updated successfully, but these errors were encountered:
y-temp4
changed the title
[question] Cannot find module 'detect-package-manager'
[question] Error: Cannot find module 'detect-package-manager'
Dec 7, 2023
I see the same thing with semver when using pnpx with hoisting turned off in .npmrc. Injecting a dep on semver then gives the detect-package-manager error described here. After injecting a dep on that too, it works.
So, in other words, this package is depending on npm's (and yarn 1's) default behavior of hoisting dependencies and needs either a deprendency or peerDependency on both semver and detect-package-manager.
I haven't tested, but with newer versions of yarn that have PnP enabled it probably fails similarly.
It seems that when running tests for a Storybook managed in a separate package, with a package.json that only includes
@storybook/test-runner
,concurrently
, andwait-on
as dependencies, an error occurs statingError: Cannot find module 'detect-package-manager'
.I suspect this error is due to
detect-package-manager
being included in thedevDependencies
of@storybook/test-runner
, rather than in itsdependencies
.The version of
@storybook/test-runner
being used is0.16.0
.The text was updated successfully, but these errors were encountered: