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

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

Description

@megob56

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions