Skip to content
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

I get this error while migrating to v2 (void 0) is not a function #335

Open
tagbahaa opened this issue Jan 23, 2025 · 3 comments
Open

I get this error while migrating to v2 (void 0) is not a function #335

tagbahaa opened this issue Jan 23, 2025 · 3 comments

Comments

@tagbahaa
Copy link

tagbahaa commented Jan 23, 2025

Hello guys, thank you for maintaining this package.

I'm currently trying to migrate to version 2 I changed methods names as mentioned at the docs but I get this error on production but it works when I run in production mode locally

Image

I'm guessing that my code can't access strings functions properly, any help dealing with this?

I don't use the vite plugin to compile the strings as it fails at the build looking for some .git/ folder. alternatively I use this cli command alongside my build script
bunx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/paraglide

this is my docker file

FROM oven/bun:1.1-alpine AS build

WORKDIR /app

COPY package.json bun.lockb project.inlang ./

RUN bun install --frozen-lockfile

COPY . .
RUN bun run build

FROM caddy:latest

WORKDIR /usr/share/caddy

COPY Caddyfile /etc/caddy/Caddyfile

COPY --from=build /app/dist .

EXPOSE 5050 

CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
@samuelstroschein
Copy link
Member

I don't use the vite plugin to compile the strings as it fails at the build looking for some .git/ folder. alternatively I use this cli command alongside my build script

THe vite plugin that you can import from the Paraglide JS 2.0 beta is not dependent on git anymore. Are you using the vite plugin from the Paraglide JS 2.0 beta?

import { paraglideVitePlugin } from "@inlang/paraglide-js"

To resolve this issue

  1. Can you create a reproduction repo?
  2. Does it work with node?

@tagbahaa
Copy link
Author

tagbahaa commented Jan 23, 2025

@samuelstroschein
yes it works well with node:21-alpine

I can create a new repo should I share it here ?

I removed all paraglide config and made the init command again but I currently get this error on the bun setup and now I'm depending on the new vite plugin to compile the strings

Image

Copy link
Member

Yes a github repo would be great.

I assume bun is failing because of a diverging implementation of mkdirSync. A reproduction will clarify that.

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

No branches or pull requests

2 participants