-
Notifications
You must be signed in to change notification settings - Fork 191
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
Latest release broke storybook #362
Comments
This doesn't seem like something we can do.. we're not in control of which version And though we can force newer version of webpack to be used, this is mostly up to the end-user of storybook to decide. Every new installation of storybook is broken, every user that has no lockfile, or updates their lockfile runs into this issue. |
Here are a couple more findings after some debugging. I logged // FileExistsPlugin.js
fs.stat(file, (err, stat) => {
if(file.includes('storybook-config-entry')) {
console.log({file, err, stat})
}
// ...
} And did the same in 5.11.0. Here's running Storybook with enhanced-resolve 5.10.0: {
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.mjs',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.mjs'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.mjs'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.js',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.js'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.jsx',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.jsx'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.jsx'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.ts',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.ts'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.ts'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.tsx',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.tsx'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.tsx'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.json',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.json'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.cjs',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.cjs'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.cjs'
},
stat: undefined
}
{
file: 'storybook-config-entry.js',
err: null,
stat: VirtualStats {
dev: 8675309,
nlink: 0,
uid: 1000,
gid: 1000,
rdev: 0,
blksize: 4096,
ino: 45000001,
mode: 33188,
size: 5591,
blocks: 1,
atime: 2022-11-22T17:56:59.907Z,
mtime: 2022-11-22T17:56:59.907Z,
ctime: 2022-11-22T17:56:59.907Z,
birthtime: 2022-11-22T17:56:59.907Z
}
} So it seems like it tries to resolve Now, for version 5.11.0, the output is the following. It just fails to find the file, retries, and fails 6 times: {
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.mjs',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.mjs'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.mjs'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.js',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.js'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.jsx',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.jsx'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.jsx'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.ts',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.ts'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.ts'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.tsx',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.tsx'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.tsx'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.json',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.json'
},
stat: undefined
}
{
file: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.cjs',
err: [Error: ENOENT: no such file or directory, stat 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.cjs'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: 'Users/yannbraga/open-source/status-page/storybook-config-entry.js.cjs'
},
stat: undefined
} When running Storybook with Could this be an incompatibility with |
How to reproduce the issueThe fastest way to get a Storybook + Webpack project is by running the following command in the terminal:
|
Platform complete is currently failing due to an issue with enhanced-resolve v5.11.0 (thank you @zburke for pointing to it): webpack/enhanced-resolve#362 This PR locks `enhanced-resolve` to "~5.10.0" it also upgrades `ts-loader` to make sure a single version of enhanced-resolve is used in the dependency tree. Errors from https://jenkins-aws.indexdata.com/job/Automation/job/build-platform-complete-snapshot/13912/consoleText look like ``` "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "29:14-33" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "30:17-39" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "31:19-43" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "32:18-41" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "ERROR" in ": "./node_modules/@folio/stripes-core/src/App.js" "20:0-62" ": "Module "not found"": ": "Error"": ": Can't resolve 'stripes-config' in '/home/jenkins/workspace/Automation/build-platform-complete-snapshot/node_modules/@folio/stripes-core/src'" @ ./node_modules/@folio/stripes-core/src/init.js 5:0-24 8:28-31 @ ./node_modules/@folio/stripes-core/index.js 35:0-45 35:0-45 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 ... ``` Fixes STRWEB-61
@yannbf Thanks for the detailed repro steps! So the change introduced in: |
Yep - just traced the same line of reasoning. By same implication, there is no caching done on any requests with options, which probably isnt what we want from a perf perspective either (aside from virtual modules). True fix is to support cache for requests with options, but that may take a small while to get working (need to check if there are wacky options for certain fs calls that might complicate things). Probably best to revert so as not to rush figuring that all out cc @sokra |
would it be possible to roll this back? |
agree |
agree, too!! :) |
I'll open a PR that reverts this change, hopefully @sokra can take a look soon. |
If you can't wait for this issue to be resolved and you are using
I'm not sure what the equivalent using |
in yarn you can do:
|
Platform complete is currently failing due to an issue with enhanced-resolve v5.11.0 (thank you @zburke for pointing to it): webpack/enhanced-resolve#362 This PR locks `enhanced-resolve` to "~5.10.0" it also upgrades `ts-loader` to make sure a single version of enhanced-resolve is used in the dependency tree. Errors from https://jenkins-aws.indexdata.com/job/Automation/job/build-platform-complete-snapshot/13912/consoleText look like ``` "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "29:14-33" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "30:17-39" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "31:19-43" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "WARNING" in ": "./node_modules/@folio/stripes-core/src/components/ModuleTranslator/ModuleTranslator.js" "32:18-41" ": "export 'originalModules' (imported as 'originalModules') was "not found"": " in '../../ModulesContext' (possible exports: "ModulesContext, default, useModules"": ")" @ ./node_modules/@folio/stripes-core/src/components/ModuleTranslator/index.js 1:0-45 1:0-45 @ ./node_modules/@folio/stripes-core/src/components/index.js 12:0-65 12:0-65 @ ./node_modules/@folio/stripes-core/index.js 28:0-107 28:0-107 28:0-107 28:0-107 28:0-107 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 "ERROR" in ": "./node_modules/@folio/stripes-core/src/App.js" "20:0-62" ": "Module "not found"": ": "Error"": ": Can't resolve 'stripes-config' in '/home/jenkins/workspace/Automation/build-platform-complete-snapshot/node_modules/@folio/stripes-core/src'" @ ./node_modules/@folio/stripes-core/src/init.js 5:0-24 8:28-31 @ ./node_modules/@folio/stripes-core/index.js 35:0-45 35:0-45 @ ./node_modules/@folio/stripes-ui/src/index.js 1:0-43 2:0-4 ... ``` Fixes STRWEB-61
In the latest release (about 2 hours ago since the time of writing this), storybook broke if users upgrade to the latest version of this package.
It seems that the virtual-modules-plugin we use is not compatible with this change:
https://www.npmjs.com/package/webpack-virtual-modules
We see the following error happening in our CI:
link to CI
The file
.../storybook-config-entry.js
, is injected as a virtual module using the plugin described above.When we version lock to 5.10.0 the problem goes away.
comparing 5.10.0 & 5.11.0:
v5.10.0...v5.11.0
It looks like this code was added:
{ throwIfNoEntry: false }
link to change
Looks like it was introduced in this PR:
#324
@markjm @sokra Do you have any recommendations for us?
The text was updated successfully, but these errors were encountered: