HealthCatalyst / Fabric.Cashmere

Health Catalyst’s comprehensive design system.
http://cashmere.healthcatalyst.net
Apache License 2.0
66 stars 76 forks source link

Errors after running npm run new:example command #2366

Open JakeSaintG opened 3 hours ago

JakeSaintG commented 3 hours ago

Summary

When attempting to create an example for the breadcrumbs, I got an error from the npm run new:example command. The error comes from new-example.ts, line 30, where it attempts to run Object.keys over a undefined or null object from the package.json. It expects a peerDependencies obj to exist in the cashmere-example project's package.json. Additionally, if the npm run new:example does succeed, subsequent runs or running npm install causes a package mismatch erro rin the cashmere-examples package.json and package-lock.json.

Reproduction Steps to reproduce:

  1. Running npm run new:example will immediately cause the error to happen.
  2. If the command succeeds (either by having a peerDeps obj or defaulting to an empty array), running the command again or running npm i will cause the package mismatch error.

Additional context I have an existing branch with a fix that defaults to an empty array if the package.json does not have a peerDependencies obj. Additionally, I am testing a solution or two to the package mismatch issue. I hope to make a PR with the fixes to this issue very soon.