-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG - Sev-3 - All - Storybook complains about missing dist/
folder in local dev environment
#6989
Comments
The direction of this ticket after much troubleshooting was decided to be:
To document why this was the chosen direction:
Upon trying to move forward with the hacky solution with it configured as a preinstall script (in theory runs before every install), it only worked intermittently. It worked if the node_modules did not exist, but if they already existed and had no changes then it did not work. As far as I can tell, this is a sporadically fixed then unfixed npm bug wherein preinstall/postinstall scripts and the like do not always run correctly. Additionally, looking around the documentation into why it wasn't working, I came across the yarn documentation that explicitly indicates:
which made me recognize that the script may try to run when packaged up and consumed by an app--which wouldn't work trying to navigate to a directory that didn't exist. In theory logic could be made to circumvent that problem, but paired with it only intermittently working as desired in the project it seems sensible to just drop automatically handling it. As such, we arrive at the solution documented at the top of this comment. |
What happened?
In our dev environment, the components package is using a local version of the tokens package instead of pulling down a remote version from NPM. This causes errors in our storybook app if the developer hasn't run
yarn build
in the tokens package. The components package relies on files in thedist/
folder of tokens, which is currently in our.gitignore
file.Steps to Reproduce
dist/
folder inpackages/tokens
dist/
folder.Desired behavior
Acceptance Criteria
Update our yarn configuration to pull down the remote version of our design tokens packageORRemove theORdist/
folder from our .gitignoreThe text was updated successfully, but these errors were encountered: