-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Yarn pnp incompatibility #17978
Comments
With this package.json "@storybook/addon-actions": "^6.5.0-alpha.63",
"@storybook/addon-docs": "^6.5.0-alpha.63",
"@storybook/addon-essentials": "^6.5.0-alpha.63",
"@storybook/addon-interactions": "^6.5.0-alpha.63",
"@storybook/addon-links": "^6.5.0-alpha.63",
"@storybook/builder-webpack5": "^6.5.0-alpha.63",
"@storybook/manager-webpack5": "^6.5.0-alpha.63",
"@storybook/react": "^6.5.0-alpha.63",
"@storybook/testing-library": "^0.0.9", And config: const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
module.exports = {
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ['@storybook/addon-docs'],
core: {
builder: "webpack5"
},
webpackFinal: (config) => {
config.plugins.push(new NodePolyfillPlugin())
return config
}
}; Build stucks: |
This is also caught by our E2E tests, and shows the problem started with v6.5.0-alpha.63. Alpha 62: https://github.com/yarnpkg/berry/runs/6020572677?check_suite_focus=true The diff is here, which seems to show #17947 being the initial issue (with cc @Andarist |
@arcanis thanks for the links to your CI jobs - based on them I was able to repro this locally and gonna look into this soon |
Note we use Yarn with |
Hi! Any updates? |
The PR is up - it just needs to be re-reviewed: #18015 |
Is it any workaround at the moment? |
Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-rc.0 containing PR #18015 that references this issue. Upgrade today to the
|
I can confirm the RC works for us, thanks! |
I'm having the same issue by using [email protected] yarn 3.2.0
Wonder is that version 6.5 does not support pnp? |
Try installing dependency |
Even install assert or
just neither work for me and after switching to I believe the latest version does not really support the PNP mode while 6.4.2 is works |
This issue was closed, but I'm not seeing any mention of actually fixing Error 2 described by @DiFuks |
If the issue persists please create a runnable repro case with the up-to-date dependencies so I could take a look at it. |
@Andarist Please see #18319, with repro in https://github.com/WoodyWoodsta/storybook-repro-1 |
@Andarist I too am suffering from both these issues whilst trying to upgrade I can workaround issue 2 ( config.resolve.fallback = {
...(config.resolve.fallback || {}),
util: require.resolve('util/'),
}; However I cannot figure out a fix for issue 1 ( Failed to load preset: {"type":"presets","name":"/Users/jackwestbrook/Projects/grafana/.yarn/__virtual__/storybook-dark-mode-virtual-b6126dd706/0/cache/storybook-dark-mode-npm-1.1.0-3820b02cd6-e1d7abbb96.zip/node_modules/storybook-dark-mode/dist/index.js"} on level 1
ERR! ReferenceError: window is not defined Given the reference error it appears to be building for a nodejs env? 🤔 I think this issue was closed prematurely (most likely with the merge of #18015) and should probably be reopened. |
The issue got closed because the reported & reproducible issues were resolved. It is likely that the overall issue persists but in such a case a new dedicated issue could be opened to track this separately. I might not be able to look into this though because I was just fixing those issues here in my spare time, as an external contributor and I don't have enough time to look into everything (even though I would like to). |
@jackw @Andarist I believe @yannbf and @ndelangen are picking this up where you left off. hopefully we'll have a good fix soon! |
@shilman That's great news! If I can be of any assistance @yannbf @ndelangen please let me know. |
This is broken again in beta 7 |
Describe the bug
At first I was getting the error listed in this issue. After updating the libraries to the latest alpha versions, other errors appeared
To Reproduce
yarn 3.2.0
node.js v16.14.2
react 18.0.0
.package.json
.storybook/main.js
.yarnrc.yml
Error 1
Error 2
With nodeLinker: node-modules:
Error 1
System
System:
OS: macOS 12.2
CPU: (8) arm64 Apple M1
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 3.2.0 - ~/.nvm/versions/node/v16.14.2/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Browsers:
Chrome: 100.0.4896.88
Safari: 15.3
The text was updated successfully, but these errors were encountered: