Skip to content

Add package-lock.json to Dockerfiles for Storybook and Vite apps#540

Merged
mkernohanbc merged 1 commit intomainfrom
bugfix/docker-dependencies
Nov 14, 2025
Merged

Add package-lock.json to Dockerfiles for Storybook and Vite apps#540
mkernohanbc merged 1 commit intomainfrom
bugfix/docker-dependencies

Conversation

@mkernohanbc
Copy link
Copy Markdown
Contributor

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.json alongside package.json to the files copied into a Docker container when those builds actions run.

@mkernohanbc mkernohanbc self-assigned this Nov 14, 2025
@mkernohanbc mkernohanbc requested a review from ty2k November 14, 2025 00:45
Copy link
Copy Markdown
Contributor

@ty2k ty2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mkernohanbc mkernohanbc merged commit 711aafe into main Nov 14, 2025
5 checks passed
@mkernohanbc mkernohanbc deleted the bugfix/docker-dependencies branch November 18, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants