TurboSnap Causing Storybook Publish to Fail
Opened this issue · 3 comments
I have read over the two existing issues #486 and #530 on encountering a Did not find any CSF globs in preview-stats.json
error while running a chromatic build with turbosnap and storyStoreV7
.
I have upgraded my chromatic to v6.5.3 to make sure that the fix from PR 539 was incorporated.
Turbosnap seems to work well if I remove storyStoreV7
, but with it turned on I get the following error:
Chromatic CLI v6.5.3
https://www.chromatic.com/docs/cli
Authenticating with Chromatic
→ Connecting to https://index.chromatic.com
Authenticated with Chromatic
→ Using project token '********5118'
Retrieving git information
git info: {"commit":{"commit":"dbe3c727dc5a071491f78b6df617f003bea60549","committedAt":1649188011000,"committerEmail":"tommy@unicycle.co","committerName":"Tommy"},"branch":"tommy/turbosnapDebugging","isTravisPrBuild":false,"fromCI":false}
App firstBuild: '{"committedAt":1642104298000}', lastBuild: 'null', pullRequest: 'null'
step: checking 20 up to 1642104298
step: commitsWithBuilds:
step: commitsWithoutBuilds:
running git rev-list HEAD --since 1642104298 -n 20 --not
command output: dbe3c727dc5a071491f78b6df617f003bea60549,88e1cf3bdce8acc63d5e22539651e01a809d72f1,d68b3820e11edc7f86083160958984de45ea1fcf,f0beb1035b2d7de3a00615c652fa7cb4022b5dad,eb0405d623fe1ad1f0ccf11c61076393cb7eb360,8537e16124069de918ee47b29cbd4a9b9410ac07,af8a74c02b700dd59ed6c94e0dc546e042b5b0e7,2d582b38ba42961ceaeeaf872885e49556c66bad,6f7b7bc867fdcdac2222aafdb48672b755b0b755,b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c,e9171c20c48234a41097906eb99ccfbe61c3b1ec,9fecd679ede20f2f32022e50b9d1ed2c956df9f5,76218d7f91f6681449f594f986dd69811f178b4e,911a3e19d8912dfaf51255a8340bbebce7822564,8cbc5d08c0d628177ef8950995a260a0b88677d4,f3c504ac0731633cb4e953317d5de40659dfba9b,d8560b3b3681f05236a16d4624abfd109dc0ca38,4752dd5782963c5c2d6f7019d07b189d2d38e113,cf1733e6d85907b91ea7a614d629f650df310171,ab2d71fda967082bb644934121807fa34edc7342
step: candidateCommits: dbe3c727dc5a071491f78b6df617f003bea60549,88e1cf3bdce8acc63d5e22539651e01a809d72f1,d68b3820e11edc7f86083160958984de45ea1fcf,f0beb1035b2d7de3a00615c652fa7cb4022b5dad,eb0405d623fe1ad1f0ccf11c61076393cb7eb360,8537e16124069de918ee47b29cbd4a9b9410ac07,af8a74c02b700dd59ed6c94e0dc546e042b5b0e7,2d582b38ba42961ceaeeaf872885e49556c66bad,6f7b7bc867fdcdac2222aafdb48672b755b0b755,b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c,e9171c20c48234a41097906eb99ccfbe61c3b1ec,9fecd679ede20f2f32022e50b9d1ed2c956df9f5,76218d7f91f6681449f594f986dd69811f178b4e,911a3e19d8912dfaf51255a8340bbebce7822564,8cbc5d08c0d628177ef8950995a260a0b88677d4,f3c504ac0731633cb4e953317d5de40659dfba9b,d8560b3b3681f05236a16d4624abfd109dc0ca38,4752dd5782963c5c2d6f7019d07b189d2d38e113,cf1733e6d85907b91ea7a614d629f650df310171,ab2d71fda967082bb644934121807fa34edc7342
step: newCommitsWithBuilds: dbe3c727dc5a071491f78b6df617f003bea60549,88e1cf3bdce8acc63d5e22539651e01a809d72f1,d68b3820e11edc7f86083160958984de45ea1fcf,eb0405d623fe1ad1f0ccf11c61076393cb7eb360,8537e16124069de918ee47b29cbd4a9b9410ac07,af8a74c02b700dd59ed6c94e0dc546e042b5b0e7,2d582b38ba42961ceaeeaf872885e49556c66bad,6f7b7bc867fdcdac2222aafdb48672b755b0b755,b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c,e9171c20c48234a41097906eb99ccfbe61c3b1ec,9fecd679ede20f2f32022e50b9d1ed2c956df9f5,76218d7f91f6681449f594f986dd69811f178b4e,911a3e19d8912dfaf51255a8340bbebce7822564,8cbc5d08c0d628177ef8950995a260a0b88677d4,f3c504ac0731633cb4e953317d5de40659dfba9b,d8560b3b3681f05236a16d4624abfd109dc0ca38,4752dd5782963c5c2d6f7019d07b189d2d38e113,cf1733e6d85907b91ea7a614d629f650df310171,ab2d71fda967082bb644934121807fa34edc7342
step: checking 40 up to 1642104298
step: commitsWithBuilds: dbe3c727dc5a071491f78b6df617f003bea60549,88e1cf3bdce8acc63d5e22539651e01a809d72f1,d68b3820e11edc7f86083160958984de45ea1fcf,eb0405d623fe1ad1f0ccf11c61076393cb7eb360,8537e16124069de918ee47b29cbd4a9b9410ac07,af8a74c02b700dd59ed6c94e0dc546e042b5b0e7,2d582b38ba42961ceaeeaf872885e49556c66bad,6f7b7bc867fdcdac2222aafdb48672b755b0b755,b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c,e9171c20c48234a41097906eb99ccfbe61c3b1ec,9fecd679ede20f2f32022e50b9d1ed2c956df9f5,76218d7f91f6681449f594f986dd69811f178b4e,911a3e19d8912dfaf51255a8340bbebce7822564,8cbc5d08c0d628177ef8950995a260a0b88677d4,f3c504ac0731633cb4e953317d5de40659dfba9b,d8560b3b3681f05236a16d4624abfd109dc0ca38,4752dd5782963c5c2d6f7019d07b189d2d38e113,cf1733e6d85907b91ea7a614d629f650df310171,ab2d71fda967082bb644934121807fa34edc7342
step: commitsWithoutBuilds: f0beb1035b2d7de3a00615c652fa7cb4022b5dad
running git rev-list HEAD --since 1642104298 -n 41 --not dbe3c727dc5a071491f78b6df617f003bea60549 88e1cf3bdce8acc63d5e22539651e01a809d72f1 d68b3820e11edc7f86083160958984de45ea1fcf eb0405d623fe1ad1f0ccf11c61076393cb7eb360 8537e16124069de918ee47b29cbd4a9b9410ac07 af8a74c02b700dd59ed6c94e0dc546e042b5b0e7 2d582b38ba42961ceaeeaf872885e49556c66bad 6f7b7bc867fdcdac2222aafdb48672b755b0b755 b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c e9171c20c48234a41097906eb99ccfbe61c3b1ec 9fecd679ede20f2f32022e50b9d1ed2c956df9f5 76218d7f91f6681449f594f986dd69811f178b4e 911a3e19d8912dfaf51255a8340bbebce7822564 8cbc5d08c0d628177ef8950995a260a0b88677d4 f3c504ac0731633cb4e953317d5de40659dfba9b d8560b3b3681f05236a16d4624abfd109dc0ca38 4752dd5782963c5c2d6f7019d07b189d2d38e113 cf1733e6d85907b91ea7a614d629f650df310171 ab2d71fda967082bb644934121807fa34edc7342
command output:
step: candidateCommits:
step: no candidateCommits; we are done
Final commitsWithBuilds: dbe3c727dc5a071491f78b6df617f003bea60549,88e1cf3bdce8acc63d5e22539651e01a809d72f1,d68b3820e11edc7f86083160958984de45ea1fcf,eb0405d623fe1ad1f0ccf11c61076393cb7eb360,8537e16124069de918ee47b29cbd4a9b9410ac07,af8a74c02b700dd59ed6c94e0dc546e042b5b0e7,2d582b38ba42961ceaeeaf872885e49556c66bad,6f7b7bc867fdcdac2222aafdb48672b755b0b755,b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c,e9171c20c48234a41097906eb99ccfbe61c3b1ec,9fecd679ede20f2f32022e50b9d1ed2c956df9f5,76218d7f91f6681449f594f986dd69811f178b4e,911a3e19d8912dfaf51255a8340bbebce7822564,8cbc5d08c0d628177ef8950995a260a0b88677d4,f3c504ac0731633cb4e953317d5de40659dfba9b,d8560b3b3681f05236a16d4624abfd109dc0ca38,4752dd5782963c5c2d6f7019d07b189d2d38e113,cf1733e6d85907b91ea7a614d629f650df310171,ab2d71fda967082bb644934121807fa34edc7342
running git rev-list dbe3c727dc5a071491f78b6df617f003bea60549 88e1cf3bdce8acc63d5e22539651e01a809d72f1 d68b3820e11edc7f86083160958984de45ea1fcf eb0405d623fe1ad1f0ccf11c61076393cb7eb360 8537e16124069de918ee47b29cbd4a9b9410ac07 af8a74c02b700dd59ed6c94e0dc546e042b5b0e7 2d582b38ba42961ceaeeaf872885e49556c66bad 6f7b7bc867fdcdac2222aafdb48672b755b0b755 b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c e9171c20c48234a41097906eb99ccfbe61c3b1ec 9fecd679ede20f2f32022e50b9d1ed2c956df9f5 76218d7f91f6681449f594f986dd69811f178b4e 911a3e19d8912dfaf51255a8340bbebce7822564 8cbc5d08c0d628177ef8950995a260a0b88677d4 f3c504ac0731633cb4e953317d5de40659dfba9b d8560b3b3681f05236a16d4624abfd109dc0ca38 4752dd5782963c5c2d6f7019d07b189d2d38e113 cf1733e6d85907b91ea7a614d629f650df310171 ab2d71fda967082bb644934121807fa34edc7342 --not "dbe3c727dc5a071491f78b6df617f003bea60549^@" "88e1cf3bdce8acc63d5e22539651e01a809d72f1^@" "d68b3820e11edc7f86083160958984de45ea1fcf^@" "eb0405d623fe1ad1f0ccf11c61076393cb7eb360^@" "8537e16124069de918ee47b29cbd4a9b9410ac07^@" "af8a74c02b700dd59ed6c94e0dc546e042b5b0e7^@" "2d582b38ba42961ceaeeaf872885e49556c66bad^@" "6f7b7bc867fdcdac2222aafdb48672b755b0b755^@" "b722afda3d0f7e5445c5cd51e5cf01cc66f97b7c^@" "e9171c20c48234a41097906eb99ccfbe61c3b1ec^@" "9fecd679ede20f2f32022e50b9d1ed2c956df9f5^@" "76218d7f91f6681449f594f986dd69811f178b4e^@" "911a3e19d8912dfaf51255a8340bbebce7822564^@" "8cbc5d08c0d628177ef8950995a260a0b88677d4^@" "f3c504ac0731633cb4e953317d5de40659dfba9b^@" "d8560b3b3681f05236a16d4624abfd109dc0ca38^@" "4752dd5782963c5c2d6f7019d07b189d2d38e113^@" "cf1733e6d85907b91ea7a614d629f650df310171^@" "ab2d71fda967082bb644934121807fa34edc7342^@"
command output: dbe3c727dc5a071491f78b6df617f003bea60549
Found parentCommits: dbe3c727dc5a071491f78b6df617f003bea60549
^FaFound baselineCommits: dbe3c727dc5a071491f78b6df617f003bea60549
^[Found 1 changed files:
.storybook/main.js
Retrieved git information
→ Commit 'dbe3c72' on branch 'tommy/turbosnapDebugging'; found 1 parent build and 1 changed file
Collecting Storybook metadata
Collected Storybook metadata
→ Storybook 6.4.9 for React; supported addons found: A11y, Actions, Essentials, Links
Building your Storybook
→ Running command: npm run --silent build-storybook -- --output-dir /var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1 --webpack-stats-json /var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1
Using spawnParams: {
"client": "npm",
"clientVersion": "6.14.12",
"nodeVersion": "v14.16.1",
"platform": "darwin",
"command": "npm",
"clientArgs": [
"run",
"--silent"
],
"scriptArgs": [
"build-storybook",
"--",
"--output-dir",
"/var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1",
"--webpack-stats-json",
"/var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1"
]
}
Storybook built in 1 minute 30 seconds
→ View build log at /Users/tommyjeon/Code/unicycle/unicycle-web/build-storybook.log
Publish your built Storybook
→ Validating Storybook files
Retrieving story files affected by recent changes
→ Traversing dependencies for 1 file that changed since the last build
✖ Did not find any CSF globs in /var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1/preview-stats.json
Check your stories configuration in .storybook/main.js
ℹ Read more at https://storybook.js.org/docs/react/configure/overview
Failed to retrieve dependent story files {"statsPath":"/var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1/preview-stats.json","changedFiles":[".storybook/main.js"],"err":{}}
→ Could not retrieve dependent story files.
Did not find any CSF globs in preview-stats.json
✖ Failed to publish your built Storybook
Could not retrieve dependent story files.
Did not find any CSF globs in preview-stats.json
→ View the full stacktrace below
If you need help, please chat with us at https://www.chromatic.com/docs/cli for the fastest response.
You can also email the team at support@chromatic.com if chat is not an option.
Please provide us with the above CLI output and the following info:
{
"timestamp": "2022-04-05T20:00:31.659Z",
"sessionId": "ac31ea9d-e62f-48f5-808d-0e664698e9ea",
"gitVersion": "2.30.1 (Apple Git-130)",
"nodePlatform": "darwin",
"nodeVersion": "14.16.1",
"packageName": "chromatic",
"packageVersion": "6.5.3",
"storybook": {
"addons": [
{
"name": "a11y",
"packageName": "@storybook/addon-a11y",
"packageVersion": "^6.4.13"
},
{
"name": "actions",
"packageName": "@storybook/addon-actions",
"packageVersion": "^6.4.9"
},
{
"name": "essentials",
"packageName": "@storybook/addon-essentials",
"packageVersion": "^6.4.9"
},
{
"name": "links",
"packageName": "@storybook/addon-links",
"packageVersion": "^6.4.9"
}
],
"staticDir": [
"public"
],
"viewLayer": "react",
"version": "6.4.9"
},
"flags": {
"projectToken": [
"08ab89bd5118"
],
"debug": true,
"onlyChanged": "",
"outputDir": [],
"storybookBuildDir": [],
"externals": [],
"untraced": [],
"interactive": true,
"appCode": []
},
"buildScript": "build-storybook -s public",
"spawnParams": {
"client": "npm",
"clientVersion": "6.14.12",
"nodeVersion": "v14.16.1",
"platform": "darwin",
"command": "npm",
"clientArgs": [
"run",
"--silent"
],
"scriptArgs": [
"build-storybook",
"--",
"--output-dir",
"/var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1",
"--webpack-stats-json",
"/var/folders/cn/j3y11d1n4fb27p006rdspn7h0000gn/T/chromatic--46668-b5GRQCVZMtQ1"
]
},
"exitCode": 0,
"exitCodeKey": "OK",
"errorType": "Error",
"errorMessage": "✖ Failed to publish your built Storybook",
"build": {
"id": "624c9db68e9fe6003a4cd075",
"number": 488
}
}
Error: ✖ Failed to publish your built Storybook
Could not retrieve dependent story files.
Did not find any CSF globs in preview-stats.json
at /Users/tommyjeon/Code/unicycle/unicycle-web/node_modules/chromatic/bin/main.cjs:3:1505281
at /Users/tommyjeon/Code/unicycle/unicycle-web/node_modules/chromatic/bin/main.cjs:3:1501958
at Object.next (/Users/tommyjeon/Code/unicycle/unicycle-web/node_modules/chromatic/bin/main.cjs:3:1502063)
at a (/Users/tommyjeon/Code/unicycle/unicycle-web/node_modules/chromatic/bin/main.cjs:3:1500777)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Here is my .storybook/main.js for context:
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
// include addons in the order you want them to appear in the UI
addons: [
"storybook-preset-craco",
"@storybook/addon-essentials",
"storybook-addon-designs",
"@storybook/addon-interactions",
"@storybook/addon-a11y",
"@storybook/addon-links",
],
features: {
storyStoreV7: true,
},
framework: "@storybook/react",
typescript: {
check: true,
reactDocgen: "react-docgen-typescript",
reactDocgenTypescriptOptions: {
propFilter: (prop) =>
[
"DOMAttributes",
"HTMLAttributes",
"SVGAttributes",
"AriaAttributes",
].every(
(excludedPropParent) => prop?.parent?.name !== excludedPropParent
),
compilerOptions: {
allowSyntheticDefaultImports: false,
esModuleInterop: false,
},
},
},
};
I saw that the preview fix was to add logic for chromatic read modules packages like so "./storybook-config-entry.js + 1 modules"
. How do I go about diagnosing what might be causing the issue for me?
Hi @codewitch, probably your best bet is to trim your preview-stats.json
and take a look at what's in there. You can send the file through to Chromatic support and we can take a look for you also.
Try disabling storyStoreV7
, that worked for me in #530 !