Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

[Bug] Storybook Deploy Fails with Node Version 14.18.2 #114

Open
megob56 opened this issue Jan 10, 2022 · 0 comments
Open

[Bug] Storybook Deploy Fails with Node Version 14.18.2 #114

megob56 opened this issue Jan 10, 2022 · 0 comments
Labels

Comments

@megob56
Copy link

megob56 commented Jan 10, 2022

Describe the bug

Currently upgrading our repository from node version 12 to version 14.18.2. We are using storybook-deployer version 2.8.7. When I changed the node version to v14.18.2, storybook-deployer fails to deploy.

Steps to reproduce the behavior

  1. Use node version 14.18.2
  2. Run storybook-deploy command
  3. Get error:
internal/fs/utils.js:811
  throw new ERR_INVALID_ARG_TYPE(
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Array
    at Object.writeFileSync (fs.js:1521:5)

Expected behavior

Expected storybook to deploy to github pages

Environment

  • OS: iOS
  • Node.js version: v14.18.2
  • NPM version: v7.21.1

Local Resolution

I was able to resolve the problem locally by following the advice on this stackoverflow page Stackoverflow Link

Changed line 63 in src > build-monorepo-index.js to fs.writeFileSync(path.join(outputDir, 'index.html'), index.toString()); within the storybook-deployer package and achieved success outcome.

@megob56 megob56 added the bug label Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant