Skip to content

lz-string is not declared as a peer dependency #737

@ross-moug

Description

@ross-moug

Describe the bug
When you install @solarwinds/nova-bits you receive no warning / error that lz-string is required.

This dependency is required in the CodeSandboxService which is packaged into the built artefact.

This dependency must be marked as a peer dependency so consumers are informed that this was required by the nova-bits package.

To Reproduce
Steps to reproduce the behavior:

  1. In a fresh or existing Angular project
  2. npm i @solarwinds/nova-bits
  3. npm run start

Expected behaviour
The application can be served without error.

Actual Behaviour
The following error is received when serving the application:

Build at: 2024-11-26T08:29:15.733Z - Hash: 866a2cdac023ddc6 - Time: 1117ms

./node_modules/@nova-ui/bits/fesm2020/nova-ui-bits.mjs:96:0-45 - Error: Module not found: Error: Can't resolve 'lz-string' in '/Users/rossmoug/Git/project/node_modules/@nova-ui/bits/fesm2020'

✖ Failed to compile.

Environment (please complete the following information):

  • OS: MacOs
  • Browser: Chrome
  • Browser Version: 131.0.6778.86 (Official Build) (arm64)

Additional context

Temporary workaround is to install lz-string but it would be a better experience if this was declared as a peer dependency so consumers were informed that this was required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions