I fell for the clickbait lies today while working on my project, the CLI said that apparently there's a new Fresh version out, so I blindly followed the migration guide just to realize I was practically live testing an alpha or pre-alpha, not a 2.X stable release after reading the main site header while exiting the Docs :/
I would like to know if forcing non-ready products upon the users is a policy or something. Or if it's possible to retire the "upgrade now!" CLI message because it's clearly misleading. If it's a beta then everything is a beta, if it's a stable release, then everything should be stable, gray lines are misleading at best and dangerous at worst on software.
I know this is easily fixable by git revert / git checkout but why say it's a new stable version when it's obviously not past the alpha phase? 🤨
TL;DR
- DaisyUI instructions are wrong, kill pipelines due to type errors
- Docker instructions are wrong, Fresh generates toy
.mjs files not able to run
- Versioning & readiness is misleading to users.
Things already tried
- Deleting
node_modules and deno.lock, then running deno install -r --allow-scripts
- Changing
nodeModulesDir from auto to manual
- Using a new project base
- Running
deno task update
- Cleaned docker images with
docker image prune -af and started from fresh
- Excluded/Included
deno.lock in .dockerignore (neither worked)
On Docker
The Docker instructions don't work either, this is the original dockerfile proposed by the docs:
FROM denoland/deno:latest
ARG GIT_REVISION
ENV DENO_DEPLOYMENT_ID=${GIT_REVISION}
WORKDIR /app
COPY . .
RUN deno task build
RUN deno cache _fresh/server.js
EXPOSE 8000
CMD ["serve", "-A", "_fresh/server.js"]
This is my variation
FROM docker.io/denoland/deno:alpine-2.5.2
ARG GIT_REVISION
ENV DENO_DEPLOYMENT_ID=${GIT_REVISION}
WORKDIR /app
COPY . .
RUN deno install --allow-scripts
RUN deno task build
RUN deno cache _fresh/server.js
EXPOSE 8000
ENV TERM=xterm-256color
ENV DENO_NO_UPDATE_CHECK=disable
CMD ["serve", "-A", "--unsafely-ignore-certificate-errors", "_fresh/server.js"]
I had to add deno install as a step or otherwise it won't find vite unless you add node_modules/ to the OCI image. Which is a big no in most scenarios.
Then I had to deno install --allow-scripts because Deno won't shut up about needing deno install --allow-scripts=npm:@tailwindcss/oxide otherwise the precious yet-another-rust-tool plugin won't work.
In the end neither worked. If you try to create a container either with Docker CLI or with Compose you'll get the following error:
DANGER: TLS certificate validation is disabled for all hostnames
error: Uncaught (in promise) TypeError: Cannot assign to read only property 'cli' of object '#<Object>'
_default$1h.cli = _cli$1;
^
at file:///app/_fresh/server/server-entry.mjs:9777:17
exit code: 1
What cli? There's no single cli import on this project. Is it the server CLI? Then why is that not in the docs? Am I expected to include the TypeScript types for a CLI?
On DaisyUI
The template places the styles.css file inside an assets/ directory. But the documentation example uses the same old static/styles.css approach. What is the "new" way then? It's either one on all cases or the other on all cases but not the two 🙃.
Importing it and adding it to the CSS just kills deno task check:
deno task check
Task check deno fmt --check && deno lint && deno check
Checked 133 files
Checked 93 files
error: Failed resolving types. [ERR_TYPES_NOT_FOUND] Could not find types for 'file:///home/fplinux/Desktop/project/node_modules/.deno/daisyui@5.1.10/node_modules/daisyui/index.js' imported from 'file:///home/fplinux/Desktop/project/tailwind.config.ts'
at file:///home/fplinux/Desktop/project/tailwind.config.ts:2:21
This would most likely kill pipeline processes if those are valuable to anyone (or if they even know those exist).
I fell for the clickbait lies today while working on my project, the CLI said that apparently there's a new Fresh version out, so I blindly followed the migration guide just to realize I was practically live testing an alpha or pre-alpha, not a
2.Xstable release after reading the main site header while exiting the Docs :/I would like to know if forcing non-ready products upon the users is a policy or something. Or if it's possible to retire the "upgrade now!" CLI message because it's clearly misleading. If it's a beta then everything is a beta, if it's a stable release, then everything should be stable, gray lines are misleading at best and dangerous at worst on software.
TL;DR
.mjsfiles not able to runThings already tried
node_modulesanddeno.lock, then runningdeno install -r --allow-scriptsnodeModulesDirfromautotomanualdeno task updatedocker image prune -afand started from freshdeno.lockin.dockerignore(neither worked)On Docker
The Docker instructions don't work either, this is the original
dockerfileproposed by the docs:This is my variation
I had to add
deno installas a step or otherwise it won't findviteunless you addnode_modules/to the OCI image. Which is a big no in most scenarios.Then I had to
deno install --allow-scriptsbecause Deno won't shut up about needingdeno install --allow-scripts=npm:@tailwindcss/oxideotherwise the precious yet-another-rust-tool plugin won't work.In the end neither worked. If you try to create a container either with Docker CLI or with Compose you'll get the following error:
What
cli? There's no singlecliimport on this project. Is it the server CLI? Then why is that not in the docs? Am I expected to include the TypeScript types for a CLI?On DaisyUI
The template places the
styles.cssfile inside anassets/directory. But the documentation example uses the same oldstatic/styles.cssapproach. What is the "new" way then? It's either one on all cases or the other on all cases but not the two 🙃.Importing it and adding it to the CSS just kills
deno task check:This would most likely kill pipeline processes if those are valuable to anyone (or if they even know those exist).