storybook: [Bug]: Invalid binary plist error with Storybook 7 beta
Describe the bug
I am trying to update a NextJS project to use Storybook 7 beta but when I attempt to run pnpm storybook on my Macbook M1 I am greeted with the following error:
/Users/me/Projects/next-tailwind/node_modules/.pnpm/bplist-parser@0.2.0/node_modules/bplist-parser/bplistParser.js:55
    throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");
          ^
Error: Invalid binary plist. Expected 'bplist' at offset 0.
    at Object.exports.parseBuffer (/Users/me/Projects/next-tailwind/node_modules/.pnpm/bplist-parser@0.2.0/node_modules/bplist-parser/bplistParser.js:55:11)
    at Module.defaultBrowserId (file:///Users/me/Projects/next-tailwind/node_modules/.pnpm/default-browser-id@3.0.0/node_modules/default-browser-id/index.js:27:22)
    at async module.exports (/Users/me/Projects/next-tailwind/node_modules/.pnpm/@aw-web-design+x-default-browser@1.4.88/node_modules/@aw-web-design/x-default-browser/src/detect-mac.js:4:14)
 ELIFECYCLE  Command failed with exit code 1.
This is using the @storybook/react-webpack5.
To Reproduce
Repo here: https://github.com/robcaldecott/next-tailwind/tree/storybook-7-beta
git clone git@github.com:robcaldecott/next-tailwind.git -b storybook-7-beta
cd next-tailwind
pnpm install
pnpm storybook
If you do not have pnpm then install with npm install -g pnpm. However, a separate project that uses npm exhibits the same issue so I don’t think pnpm is a factor here.
### System
```shell
System:
    OS: macOS 12.6.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 109.0
    Safari: 16.1
  npmPackages:
    @storybook/addon-actions: ^7.0.0-beta.44 => 7.0.0-beta.44 
    @storybook/addon-essentials: ^7.0.0-beta.44 => 7.0.0-beta.44 
    @storybook/addon-interactions: ^7.0.0-beta.44 => 7.0.0-beta.44 
    @storybook/addon-links: ^7.0.0-beta.44 => 7.0.0-beta.44 
    @storybook/addon-postcss: ^2.0.0 => 2.0.0 
    @storybook/react: ^7.0.0-beta.44 => 7.0.0-beta.44 
    @storybook/react-webpack5: ^7.0.0-beta.44 => 7.0.0-beta.44 
    @storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 18 (8 by maintainers)
@zhyd1997 I’ve fixed it!
pnpm storybooknow runs!Thank you so much for your help ⭐
--no-openhelps here. So this is definitely BE which needs to be fixed on storybook side.storybook dev -p 6006 --no-open -s publicThe “toggle default browser, open it, and try again” worked for me too for anyone else coming across this issue… no idea why. (I use Safari/Safari Technology Preview as my default browser.)
I’ll report the CSS issues with
@storybook/nextas a separate issue.@zhyd1997 Here it is
~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist
The issue seems to be parsing my
/Users/robert.caldecott/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plistfile in thedefault-browser-idpackage. That file exists but the package does not like it.I think it’s looking for the default browser. I have Chrome, Safari and Firefox installed with Chrome as the default.
I can also duplicate this by creating a brand new NextJS project and then adding Storybook.