reg-viz / storycap

A Storybook Addon, Save the screenshot image of your stories :camera: via puppeteer.
https://www.npmjs.com/package/storycap
MIT License
705 stars 89 forks source link

no parsers registered for: "+(Act" when running storycap @storycap4 #755

Closed kuhiga closed 1 year ago

kuhiga commented 1 year ago

After upgrading to storycap 4, I am getting the following error when running wait-on http://localhost:9009 && yarn storycap http://localhost:9009 after starting up storybook

info Wait for connecting storybook server http://localhost:9009.
info Executable Chromium path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
info Storycap runs with simple mode
error no parsers registered for: "+(Act"
Error: no parsers registered for: "+(Act"
    at parse (/repo/node_modules/snapdragon/lib/parser.js:473:15)
    at Parser.parse (/repot/node_modules/snapdragon/lib/parser.js:477:24)
    at Snapdragon.parse (/repo/node_modules/snapdragon/index.js:122:28)
    at Snapdragon.<anonymous> (/repo/node_modules/nanomatch/lib/utils.js:64:45)
    at parse (/repo/node_modules/nanomatch/index.js:706:26)
    at memoize (/repo/node_modules/nanomatch/index.js:820:13)
    at Function.nanomatch.parse (/repo/node_modules/nanomatch/index.js:712:10)
    at create (/repo/node_modules/nanomatch/index.js:663:40)
    at memoize (/repo/node_modules/nanomatch/index.js:820:13)
    at Function.nanomatch.create (/repo/node_modules/nanomatch/index.js:665:10

It seems like other plugins using snapdragon is also getting this error which was introduced in this pr that replaced minimatch with nanomatch. Has anyone come across this error or have a solution to this problem?

kirill578 commented 1 year ago

@kuhiga this issue seems to be related to nanomatch. Prior version seem to have supported a format like **/*+(Act|Bcd)*/** while the new one crashes. This can be fixed by rewriting it as individual statements

-e "**/*Act*/**" -e "**/*Bcd*/**"

kuhiga commented 1 year ago

@kirill578 Thank you for your fix! closing this issue