Open jeromecc opened 2 years ago
Did you ever figure this out? I'm getting the same issue.
I found the solution in another thread: https://github.com/hperrin/svelte-material-ui/issues/256
You need to run this first:
npx smui-theme template src/theme
It is not good practice to use npx
inside a docker container for idempotent builds. In order to satisfy the SMUI v6 need to have a theme file and static directory in place so it can run its prepare
script as part of the build you would be better off copying the minimal amount of source needed to allow prepare
to run. Doing so will improve caching of the Docker build and ensure changes to the npx
script output/use do not affect your working builds.
Here's an example snippet for the Dockerfile:
COPY package*.json .
COPY src/theme ./src/theme
RUN mkdir static
RUN npm ci --cache .npm
COPY . .
And then later, re-run prepare so it's using the CI version of the SMUI framework (and not what was in dev):
RUN npm run prepare
Describe the bug I'm using smui with SvelteKit, adapter-node and building on Docker (node:17).
Weird thing is that building on my laptop with the same node version does not reproduce this error and the app works seamlessly...
All versions of smui-theme from 6.0.0-beta.16 to 4.0.2 produce this bug.
Any idea? Thanks.
Additional context ``