Add package-lock.json to Dockerfiles for Storybook and Vite apps#540
Merged
mkernohanbc merged 1 commit intomainfrom Nov 14, 2025
Merged
Add package-lock.json to Dockerfiles for Storybook and Vite apps#540mkernohanbc merged 1 commit intomainfrom
mkernohanbc merged 1 commit intomainfrom
Conversation
ty2k
approved these changes
Nov 14, 2025
Contributor
ty2k
left a comment
There was a problem hiding this comment.
Looks good! Just noting for posterity that this is an attempt to fix broken Vite and Storybook app builds that are failing with new type errors like:
#20 [build-stage 11/11] RUN npm run vite-build
#20 0.247
#20 0.247 > @bcgov/design-system-react-components@0.5.1 vite-build
#20 0.247 > tsc && vite build
#20 0.247
#20 3.895 src/pages/Select/UseStateExample.tsx(34,9): error TS2322: Type '(selected: Key) => void' is not assignable to type '(key: Key | null) => void'.
#20 3.895 Types of parameters 'selected' and 'key' are incompatible.
#20 3.895 Type 'Key | null' is not assignable to type 'Key'.
#20 3.895 Type 'null' is not assignable to type 'Key'.
#20 ERROR: process "/bin/sh -c npm run vite-build" did not complete successfully: exit code: 2
------
> [build-stage 11/11] RUN npm run vite-build:
0.247
0.247 > @bcgov/design-system-react-components@0.5.1 vite-build
0.247 > tsc && vite build
0.247
3.895 src/pages/Select/UseStateExample.tsx(34,9): error TS2322: Type '(selected: Key) => void' is not assignable to type '(key: Key | null) => void'.
3.895 Types of parameters 'selected' and 'key' are incompatible.
3.895 Type 'Key | null' is not assignable to type 'Key'.
3.895 Type 'null' is not assignable to type 'Key'.
------
Dockerfile.vite:26
--------------------
24 |
25 | # Run Vite build script, which places built files in /app/vite-dist
26 | >>> RUN npm run vite-build
27 |
28 | # -----------
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c npm run vite-build" did not complete successfully: exit code: 2
Error: Process completed with exit code 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt to fix outstanding errors in the build scripts for the Vite and Storybook apps, that are causing builds to fail. It adds
package-lock.jsonalongsidepackage.jsonto the files copied into a Docker container when those builds actions run.