-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
CLI: Fix "Invalid version null" issues by improved version detection #22642
Conversation
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is network access?This module accesses the network. Packages should remove all network access that isn't functionally unnecessary. Consumers should audit network access to ensure legitimate use. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
390a920
to
9f43b06
Compare
9f43b06
to
55ec140
Compare
0dd0939
to
6c6f3af
Compare
Can this be merged @valentinpalkovic ? |
No, I'm working on it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me start by saying that this is super awesome ❤️
Unfortunately it seems like the pnp solutions do not work?
Yarn2
• Detecting project typeError while fetching package version in Yarn PnP mode: Error: Your application tried to access nx, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: nx
Required by: /Users/yannbraga/experiments/delete/react-ts
at makeError (/Users/yannbraga/experiments/delete/react-ts/.pnp.cjs:21064:34)
at resolveToUnqualified (/Users/yannbraga/experiments/delete/react-ts/.pnp.cjs:22781:21)
at Object.resolveToUnqualified (/Users/yannbraga/experiments/delete/react-ts/.pnp.cjs:22973:26)
at Yarn2Proxy.getPackageVersion (/Users/yannbraga/open-source/storybook/code/lib/cli/dist/generate.js:1751:43)
at isNxProject (/Users/yannbraga/open-source/storybook/code/lib/cli/dist/generate.js:535:42)
And similar errors happen when trying to resolve prettier
, @babel/plugin-transform-typescript
, eslint-plugin-storybook
in the same execution
PNPM
Detecting project typeError while fetching package version in Yarn PnP mode: Error: Your application tried to access nx, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: nx (via "nx")
Required by: /Users/yannbraga/experiments/delete/react-ts
at internalTools_makeError (/Users/yannbraga/experiments/delete/react-ts/.pnp.cjs:13925:34)
at resolveToUnqualified (/Users/yannbraga/experiments/delete/react-ts/.pnp.cjs:14884:23)
at Object.resolveToUnqualified (/Users/yannbraga/experiments/delete/react-ts/.pnp.cjs:15051:26)
at PNPMProxy.getPackageVersion (/Users/yannbraga/open-source/storybook/code/lib/cli/dist/generate.js:1492:43)
at isNxProject (/Users/yannbraga/open-source/storybook/code/lib/cli/dist/generate.js:535:42)
at detect (/Users/yannbraga/open-source/storybook/code/lib/cli/dist/generate.js:673:13)
It also feels a little weird having tons of errors but the storybook init command continues “normally” as these errors are console.error messages
Can you take a look at that?
06c8987
to
f01a652
Compare
49816c5
to
8f557f7
Compare
New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎
Footnotes |
fa7a977
to
2c3be33
Compare
Closes #22345
What I did
upgrade
andautomigrate
commands in nx projectsupgrade/init
commands inyarn workspace
environmentsnextjs
wasn't working properly inpnp
environments@storybook/addon-docs
not automatically installed when compodoc was in useChecklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]