Giter VIP home page Giter VIP logo

bati's Issues

[Bug] Solidjs + Vercel + H3 build failed + can not run telefunc server in production/build mode

Here is the command to generate the project. Hope you can check that πŸ˜†

pnpm create @batijs/app --solid --telefunc --h3 --vercel my-app

  1. When build project, we have some warning
9:25:34 AM [vike][Warning] You're executing prerender() but the config prerender isn't set to true
β–² [WARNING] "../../../../dist/server/importBuild.cjs" should be marked as external for use with "require.resolve" [require-resolve-not-external]

    node_modules/@brillout/vite-plugin-import-build/dist/autoImporter.js:8:53:
      8 β”‚ ...esolve("../../../../dist/server/importBuild....
        β•΅           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

β–² [WARNING] Ignoring this import because "node_modules/solid-js/dist/server.js" was marked as having no side effects [ignored-bare-import]

    dist/server/entries/pages_error.mjs:4:7:
      4 β”‚ import "solid-js";
        β•΅        ~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json"
  file:

    node_modules/solid-js/package.json:20:2:
      20 β”‚   "sideEffects": false,
         β•΅   ~~~~~~~~~~~~~

β–² [WARNING] Ignoring this import because "node_modules/solid-js/dist/server.js" was marked as having no side effects [ignored-bare-import]

    dist/server/entries/pages_star-wars_-id.mjs:6:7:
      6 β”‚ import "solid-js";
        β•΅        ~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json"
  file:

    node_modules/solid-js/package.json:20:2:
      20 β”‚   "sideEffects": false,
         β•΅   ~~~~~~~~~~~~~

3 warnings

  .vercel/output/functions/ssr_.func/index.js  506.9kb
  1. In production after building the project with the command vite preview --> We cannot add todos list anymore πŸ€”
[vike][request(21)] HTTP response /_telefunc 404

Hope your team can check this <3 Thanks for the great of this project <3! @magne4000

Error: cannot find module 'espree' when trying to run cli

When I run pnpm create @batijs/app, I get:

node:internal/modules/cjs/loader:995
  const err = new Error(message);
              ^

Error: Cannot find module 'espree'
Require stack:
- C:\Users\user\AppData\Local\pnpm\store\v3\tmp\dlx-20084\node_modules\.pnpm\@[email protected]\node_modules\@batijs\core\dist\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:160:956
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:9:595
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:163:6059
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:9:595
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:163:6161
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:9:595
    at file:///C:/Users/user/AppData/Local/pnpm/store/v3/tmp/dlx-20084/node_modules/.pnpm/@[email protected]/node_modules/@batijs/core/dist/index.js:1062:2023
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\user\\AppData\\Local\\pnpm\\store\\v3\\tmp\\dlx-20084\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@batijs\\core\\dist\\index.js'
  ]
}

Node version: v18.12.1
Npm version: 8.19.2

Compiled CSS-in-JS

Add Compiled.

A familiar and performant compile time CSS-in-JS library for React

React with πŸ‘ to upvote this ticket.

React vs Vue vs Solid

In the following, Bati's offical recommendation.

The recommendation follows an open discussion: everyone (especially UI framework maintainers) can engage in a conversation with us if they believe our recommendation to not be accurate.

All three are great choices and there are plenty of companies proving that you can build a successful business with each.

A lot of the choice is about personal preference: we recommend reading the offical website and documentation of React, Vue, and Solid and see what resonates most with you. (If all three seem just fine to you and none of them sticks out, then you can fallback with the conservative choice of picking the most widespread one which currently is React.)

Vike works with any UI framework, which means that you can use several UI frameworks for the same website. For example, you can use Vue or Solid while using this one React library that only works with React. (That's why we say that "Vike has the largest ecossystem" as you can cherry-pick from the ecosystem of any UI framework.)

Instead of getting stuck with decision paralysis, we recommend to decide and get started quickly and, as you scale, see for yourself whether you like your initial choice, and progressively switch UI frameworks if you change your mind.

React:

  • Pro: Largest ecosystem.
  • Pro: JSX templates (personal preference: it's a "con" for some people).
  • Pro: Innovative.
    • React introduced many novelties, most notably unidirectional UIs, JSX, Hooks, and Server Components.
  • Con: Sometimes difficult to use.
    • Its reactivity system is based on immutable objects which makes React inherently difficult to use (for example, you'll need to use memo to keep your app performant).
    • Sometimes complex, for example UI tearing is complex in a leaky way: libraries cannot always fully abtract that complexity away.
    • It has to be shown whether RSC will manage to provide an easy DX. Today, using RSC is difficult to use.
    • It has a lot of paper cuts, such as unhelpful error messages, no built-in TypeScript types, or libraries with broken ESM which need manual fixing.

Vue:

  • Pro: Large ecosystem.
  • Pro: Simple.
  • Pro: HTML-like templates (personal preference: it's a "con" for some people).
  • Pro: Cohesive ecosystem of basic tools.

Solid:

  • Pro: Simple.
    • Its reactivity system is based on observable objects, which makes it considerably simpler to use and more performant.
  • Pro: Highly performant.
  • Pro: JSX templates (personal preference: it's a "con" for some people).
  • Pro: Responsive maintainers and bugs are fixed promptly.
  • Con: Its ecosystem is growing but still not as large as React/Vue's ecosystem.

Add support for ElysiaJS and Bun

Hey, Just wanted to throw in a request for supporting ElysiaJS and bun. All good if not but Elysia is WinterCG and seems to be a popular pick for bun users. I'm working on getting this setup on my own in the meantime.

"Bati" instead of "BΓ’ti"?

For folks who don't speak a language that includes Γ’ in their writing, having to write "BΓ’ti" is a blocker.

Suggestion: we keep "BΓ’ti" in the logo but we use "Bati" otherwise.

Add Unocss

hi can we use unocss instead of tailwindcss ?

Could not resolve "vike-react/config" [plugin vike-esbuild]

Describe the bug
After starting a new project with the command pnpm create @batijs/app --react, installing dependencies and running dev mode the console shows an error
[vike][config] Failed to transpile /pages/+config.ts because:
✘ [ERROR] Could not resolve "vike-react/config" [plugin vike-esbuild]

To Reproduce
Steps to reproduce the behavior, run the following commands in order:
pnpm create @batijs/app --react
cd my-app
pnpm i && pnpm run dev

Expected behavior
Run dev mode without any errors

Screenshots
Screenshot 2024-07-03 at 17 53 27

Additional context
Using macOS Ventura 13.6.6, also I have updated node, pnpm, typescript and all libs versions to match the versions on stackblitz demo (which I know works), still the problem persists. I also tried installing the dependencies from the stackblitz lockfile.

Incorrect usage of checkbox

Describe the bug
Almost all of the settings on the landing page use checkboxes that have exclusive values. Those appear as checkboxes and have <input type="checkbox"> in HTML while semantically they work as radio.

Expected behavior
Checkboxes should be used whenever they are not depend on others state. Radio buttons should be used when there's exclusive state and only one option can be selected.

Additional context
Also focusing on one checkbox doesn't allow me to switch to another option while this behaviour is described in WCAG

cloudflare + drizzle not working by default

Describe the bug
I'm creating a new project with
pnpm create bati --react --tailwindcss --trpc --hono --drizzle --cloudflare
after create the DB and check that everything works on run pnpm run dev
I'm trying to run pnpm run preview but fails with this and other errors.

> wrangler pages dev


 ⛅️ wrangler 3.69.1 (update available 3.70.0)
-------------------------------------------------------

✘ [ERROR] Could not resolve "fs"

    ../../node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/database.js:2:19:
      2 β”‚ const fs = require('fs');
        β•΅                    ~~~~

  The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.


✘ [ERROR] Could not resolve "path"

    ../../node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/database.js:3:21:
      3 β”‚ const path = require('path');
        β•΅                      ~~~~~~

To Reproduce

pnpm create bati --react --tailwindcss --trpc --hono --drizzle --cloudflare
pnpm drizzle:generate
pnpm drizzle:migrate
pnpm drizzle:seed
pnpm run preview

Expected behavior
preview should work out of the box.
if D1 setup is required, the instructions should be part of the read me.
https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1

Additional context
I just try to follow the drizzle instruction, but I don't know how to make this works.
db.ts has this

import Database from "better-sqlite3";
import { drizzle } from "drizzle-orm/better-sqlite3";
import * as schema from "./schema";

const sqlite = new Database("sqlite.db");
export const db = drizzle(sqlite, { schema });

and export the db object, but in drizzle example, we have a request that has an env attribute that contains the DB.

export default {
  async fetch(request: Request, env: Env) {
    const db = drizzle(env.<BINDING_NAME>);
    const result = await db.select().from(users).all()
    return Response.json(result);
  },
};

so I can not easly export that db object to be used in the rest of the app.

Support modern yarn

Since there's already this awesome graphical user interface, it would be really cool if I could pick Yarn 4.3+ over pnpm (as I use it everywhere).

Fun fact: pnpm uses huge chunks of the yarn berry code base under the hood ^^

Smarter detection of imported dependency files

Shared files are files that can be imported by 0, 1 or multiple other files. Currently, those files are put in dedicated shared-* folders. They are created on file system if the bati.flags condition in package.json is true.

It's a bit cumbersome to maintain, and for complex flags combinations, it will become more and more difficult to not break things (i.e. ensuring that these files are not created when they shouldn't be).

The goal of this RFC will be to ensure that some files are only generated on file system if at least one other regular file imports it. It mostly impact shared files, but can be used anywhere in boilerplates.

How to tag a file as "dependency"

Possible solutions (TODO: pick one):

  1. files starting with comment: /* BATI dependency */
    • could be adapted in the future to support other tags: /* BATI dependency,tag1,tag2 */
  2. files with names containing [dependency], like handler[dependency].ts
    • could be adapted in the future to support other tags: handler[dependency,tag1,tag2].ts

using nodemon in dev for better experience

we could use nodemon with custom --exec with tsx in dev command, any plan for making it this way? i made the nodemon to watch only the server directory since only in there i would change any server-related code.

i tried using ts-node, but it seems giving TS Error, using tsx is much more easier.

IMG_20230702_182546_043

Endpoints 404 with vercel

Describe the bug
I use an express app to have the api on the server itself it returns a 404, it's like it doesn't find the path with vercel

To Reproduce
Just use this preset or whatever with vercel and express and check the deploy, looks great but the other endpoints are dead
pnpm create @batijs/app --react --tailwindcss --telefunc --express --vercel --eslint

Expected behavior
The other endponts other than "*" returns will return 202 or whatever if it defined in the server

Screenshots
image
image

Biome

add Biome as linter

React with πŸ‘ to upvote this ticket.

Inconsistent `context`

Hi @magne4000.

Please take a look and compare the context & pageContextInit of both h3 & express.
You can see in the screenshot below that with h3 the context is context : { context: Context }, while others like express, fastify, it's context: Context

h3 context

Install Pinia

Hey guys! How do I use pinia with Batijs? I'm using Vuejs

Always provide `headersOriginal`?

Discussed in https://github.com/batijs/bati/discussions/305

Originally posted by brillout July 10, 2024
So that we avoid this warning:

[[email protected]][Warning] HTML streaming (https://vike.dev/streaming) disabled because the User-Agent request header is unknown: make sure to provide the HTTP request headers with renderPage({ headersOriginal }). The HTTP User-Agent request header is needed so that HTML streaming can automatically be disabled for bots and crawlers, see https://github.com/brillout/react-streaming#bots for more information.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/checks.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • actions/cache v4
.github/workflows/clear-cache.yml
.github/workflows/pages.yml
  • actions/checkout v4
  • actions/setup-node v4
  • JamesIves/github-pages-deploy-action v4
.github/workflows/preview.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • rossjrw/pr-preview-action v1
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
.github/workflows/tests.yml
  • actions/checkout v4
  • actions/setup-node v4
  • oven-sh/setup-bun v2
  • actions/cache v4
  • actions/cache v4
  • actions/cache v4
  • actions/cache v4
  • actions/upload-artifact v4
npm
boilerplates/auth0/package.json
boilerplates/authjs/package.json
  • @auth/core ^0.34.2
  • @universal-middleware/core ^0.2.3
  • dotenv ^16.4.5
boilerplates/biome/package.json
  • @biomejs/biome 1.8.3
boilerplates/cloudflare/package.json
  • @hattip/adapter-cloudflare-workers ^0.0.47
  • npm-run-all2 ^6.2.2
  • vike-cloudflare ^0.0.6
  • wrangler ^3.72.0
boilerplates/compiled/package.json
  • @compiled/react ^0.17.3
  • vite ^5.4.1
  • vite-plugin-compiled-react ^1.1.3
boilerplates/drizzle/package.json
  • @types/better-sqlite3 ^7.6.11
  • better-sqlite3 ^11.1.2
  • drizzle-kit ^0.24.0
  • drizzle-orm ^0.33.0
  • tsx ^4.17.0
boilerplates/edgedb/package.json
  • @edgedb/generate ^0.5.4
  • @prisma/client ^5.18.0
  • colorette ^2.0.20
  • edgedb ^1.5.9
boilerplates/eslint/package.json
  • @eslint/js ^9.9.0
  • eslint ^9.9.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.2.1
  • eslint-plugin-react ^7.35.0
  • eslint-plugin-solid ^0.14.2
  • eslint-plugin-vue ^9.27.0
  • globals ^15.9.0
  • typescript-eslint ^8.2.0
  • vue-eslint-parser ^9.4.3
boilerplates/express/package.json
  • @auth/core ^0.34.2
  • @trpc/server ^10.45.2
  • @types/cookie-parser ^1.4.7
  • @types/express ^4.17.21
  • @universal-middleware/express ^0.2.1
  • cookie-parser ^1.4.6
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • express ^4.19.2
  • express-openid-connect ^2.17.1
  • telefunc ^0.1.76
  • tsx ^4.17.0
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/fastify/package.json
  • @auth/core ^0.34.2
  • @fastify/middie ^8.3.1
  • @fastify/static ^7.0.4
  • @trpc/server ^10.45.2
  • @types/express ^4.17.21
  • @universal-middleware/fastify ^0.2.1
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • fastify ^4.28.1
  • telefunc ^0.1.76
  • tsx ^4.17.0
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/firebase-auth/package.json
  • @types/cookie ^0.6.0
  • @universal-middleware/core ^0.2.3
  • cookie ^0.6.0
  • dotenv ^16.4.5
  • firebase ^10.13.0
  • firebase-admin ^12.3.1
  • firebaseui ^6.1.0
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/google-analytics/package.json
boilerplates/h3/package.json
  • @auth/core ^0.34.2
  • @hattip/polyfills ^0.0.47
  • @trpc/server ^10.45.2
  • @types/express ^4.17.21
  • @types/serve-static ^1.15.7
  • @universal-middleware/h3 ^0.2.0
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • h3 ~1.12.0
  • serve-static ^1.15.0
  • telefunc ^0.1.76
  • tsx ^4.17.0
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/hattip/package.json
  • @auth/core ^0.34.2
  • @hattip/adapter-node ^0.0.47
  • @hattip/adapter-vercel-edge ^0.0.47
  • @hattip/core ^0.0.47
  • @hattip/router ^0.0.47
  • @hattip/vite ^0.0.47
  • @trpc/server ^10.45.2
  • @universal-middleware/hattip ^0.2.1
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • hattip ^0.0.33
  • telefunc ^0.1.76
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/hono/package.json
  • @auth/core ^0.34.2
  • @hono/node-server ^1.12.1
  • @hono/vite-dev-server ^0.14.0
  • @trpc/server ^10.45.2
  • @universal-middleware/hono ^0.2.1
  • cross-env ^7.0.3
  • dotenv ^16.4.5
  • hono ^4.5.6
  • telefunc ^0.1.76
  • tsx ^4.17.0
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/lucia-auth/package.json
  • @lucia-auth/adapter-drizzle ^1.1.0
  • @lucia-auth/adapter-sqlite ^3.0.2
  • @types/better-sqlite3 ^7.6.11
  • @types/cookie ^0.6.0
  • @universal-middleware/core ^0.2.3
  • arctic ^1.9.2
  • better-sqlite3 ^11.1.2
  • cookie ^0.6.0
  • dotenv ^16.4.5
  • drizzle-orm ^0.33.0
  • lucia ^3.2.0
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/prettier/package.json
  • prettier ^3.3.3
boilerplates/prisma/package.json
  • @prisma/client ^5.18.0
  • colorette ^2.0.20
  • prisma ^5.18.0
boilerplates/react-firebase-auth/package.json
  • @types/react ^18.3.3
  • @types/react-dom ^18.3.0
  • firebase ^10.13.0
  • firebaseui ^6.1.0
  • react ^18.3.1
  • react-dom ^18.3.1
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/react-lucia-auth/package.json
  • @types/react ^18.3.3
  • @types/react-dom ^18.3.0
  • react ^18.3.1
  • react-dom ^18.3.1
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/react/package.json
  • @babel/core ^7.25.2
  • @babel/plugin-syntax-flow ^7.24.7
  • @babel/plugin-transform-react-jsx ^7.25.2
  • @types/react ^18.3.3
  • @types/react-dom ^18.3.0
  • @vitejs/plugin-react ^4.3.1
  • cross-fetch ^4.0.0
  • react ^18.3.1
  • react-dom ^18.3.1
  • tailwindcss ^3.4.10
  • typescript ^5.5.4
  • vike ^0.4.188
  • vike-react ^0.5.3
  • vite ^5.4.1
  • vite-plugin-compiled-react ^1.1.3
boilerplates/shared-no-db/package.json
boilerplates/shared-plain/package.json
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/shared-server/package.json
  • @universal-middleware/core ^0.2.3
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/shared-todo/package.json
boilerplates/shared/files/package.json
  • typescript ^5.5.4
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/shared/package.json
  • @hattip/vite ^0.0.47
  • vike ^0.4.188
  • vite ^5.4.1
  • vite-plugin-vercel ^8.0.1
boilerplates/solid-firebase-auth/package.json
  • firebase ^10.13.0
  • firebaseui ^6.1.0
  • solid-js ^1.8.21
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/solid-lucia-auth/package.json
  • solid-js ^1.8.21
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/solid/package.json
  • cross-fetch ^4.0.0
  • solid-js ^1.8.21
  • tailwindcss ^3.4.10
  • typescript ^5.5.4
  • vike ^0.4.188
  • vike-solid ^0.7.2
  • vite ^5.4.1
  • vite-plugin-solid ^2.10.2
boilerplates/tailwindcss/package.json
  • autoprefixer ^10.4.20
  • daisyui ^4.12.10
  • postcss ^8.4.41
  • tailwindcss ^3.4.10
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/telefunc/package.json
  • @universal-middleware/core ^0.2.3
  • telefunc ^0.1.76
  • vike ^0.4.188
  • vite ^5.4.1
boilerplates/trpc/package.json
  • @trpc/client ^10.45.2
  • @trpc/server ^10.45.2
  • vite ^5.4.1
boilerplates/ts-rest/package.json
  • @ts-rest/core ^3.50.0
  • @ts-rest/serverless ^3.50.0
  • @universal-middleware/core ^0.2.3
  • zod ^3.23.8
boilerplates/vercel/package.json
  • @vite-plugin-vercel/vike ^8.0.1
  • vike ^0.4.188
  • vite ^5.4.1
  • vite-plugin-vercel ^8.0.1
boilerplates/vue-firebase-auth/package.json
  • firebase ^10.13.0
  • firebaseui ^6.1.0
  • vike ^0.4.188
  • vite ^5.4.1
  • vue ^3.4.38
boilerplates/vue-lucia-auth/package.json
  • vike ^0.4.188
  • vite ^5.4.1
  • vue ^3.4.38
boilerplates/vue/package.json
  • @vitejs/plugin-vue ^5.1.2
  • @vue/compiler-sfc ^3.4.38
  • @vue/server-renderer ^3.4.38
  • cross-fetch ^4.0.0
  • tailwindcss ^3.4.10
  • typescript ^5.5.4
  • unplugin-vue-markdown ^0.26.2
  • vike ^0.4.188
  • vike-vue ^0.8.2
  • vite ^5.4.1
  • vue ^3.4.38
  • vue-gtag ^2.0.1
package.json
  • @eslint/js ^9.9.0
  • @types/eslint__js ^8.42.3
  • bumpp ^9.5.1
  • citty ^0.1.6
  • eslint ^9.9.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.2.1
  • eslint-plugin-react ^7.35.0
  • eslint-plugin-solid ^0.14.2
  • eslint-plugin-vue ^9.27.0
  • globals ^15.9.0
  • prettier ^3.3.3
  • rimraf ^6.0.1
  • tsx ^4.17.0
  • turbo ^2.0.14
  • typescript ^5.5.4
  • typescript-eslint ^8.2.0
  • vue-eslint-parser ^9.4.3
  • browserless ^10.5.2
  • puppeteer ^23.1.0
  • array-includes ^1.0.28
  • array.prototype.findlast ^1.0.24
  • array.prototype.flat ^1.0.28
  • array.prototype.flatmap ^1.0.28
  • array.prototype.toreversed ^1
  • array.prototype.tosorted ^1.0.24
  • es-iterator-helpers ^1.0.21
  • is-core-module ^1.0.39
  • object.assign ^1.0.28
  • object.entries ^1.0.28
  • object.fromentries ^1.0.28
  • object.hasown ^1.0.24
  • object.values ^1.0.28
  • side-channel ^1.0.29
  • string.prototype.matchall ^1.0.28
packages/batijs/package.json
packages/build/package.json
  • tsup ^8.2.4
packages/cli/package.json
  • @types/which ^3.0.4
  • citty ^0.1.6
  • colorette ^2.0.20
  • esbuild ^0.23.1
  • execa ^9.3.1
  • rimraf ^6.0.1
  • sift ^17.1.3
  • tsup ^8.2.4
  • typescript ^5.5.4
  • unplugin-purge-polyfills ^0.0.4
  • vite ^5.4.1
packages/compile/package.json
  • esbuild ^0.23.1
  • globby ^14.0.2
  • tsc-prog ^2.3.0
  • tsup ^8.2.4
  • typescript ^5.5.4
  • unplugin-purge-polyfills ^0.0.4
packages/core/package.json
  • @types/eslint ^9.6.0
  • @types/estree ^1.0.5
  • @types/which ^3.0.4
  • @typescript-eslint/parser ^8.2.0
  • @typescript-eslint/utils ^8.2.0
  • colorette ^2.0.20
  • esbuild ^0.23.1
  • eslint ^9.9.0
  • eslint-plugin-solid ^0.14.2
  • eslint-rule-composer ^0.3.0
  • espree ^10.1.0
  • magicast ^0.3.4
  • prettier ^3.3.3
  • squirrelly ^9.1.0
  • tsup ^8.2.4
  • tsx ^4.17.0
  • typescript ^5.5.4
  • unplugin-purge-polyfills ^0.0.4
  • vitest ^2.0.5
  • vue-eslint-parser ^9.4.3
  • which ^4.0.0
packages/create-bati/package.json
packages/create-batijs-app/package.json
packages/features/package.json
  • tsup ^8.2.4
  • vitest ^2.0.5
packages/tests-utils/package.json
  • get-port ^7.1.0
  • happy-dom ^14.12.3
  • node-fetch ^3.3.2
  • vitest ^2.0.5
  • which ^4.0.0
  • zx ^8.1.4
  • @types/which ^3.0.4
  • tsup ^8.2.4
  • tsx ^4.17.0
  • typescript ^5.5.4
website/package.json
  • @babel/core ^7.25.2
  • @floating-ui/dom ^1.6.10
  • @floating-ui/utils ^0.2.7
  • @solid-primitives/scheduled ^1.4.3
  • @stackblitz/sdk ^1.11.0
  • autoprefixer ^10.4.20
  • babel-preset-solid ^1.8.19
  • bumpp ^9.5.1
  • clsx ^2.1.1
  • cross-fetch ^4.0.0
  • daisyui ^4.12.10
  • esbuild ^0.23.1
  • postcss ^8.4.41
  • solid-element ^1.8.1
  • solid-js ^1.8.21
  • solid-motionone ^1.0.0
  • tailwindcss ^3.4.10
  • tslib ^2.6.3
  • typescript ^5.5.4
  • vike ^0.4.188
  • vike-solid ^0.7.2
  • vite ^5.4.1
  • vite-plugin-solid ^2.10.2

  • Check this box to trigger a request for Renovate to run again on this repository

Website down

Describe the bug
A clear and concise description of what the bug is.

Website down

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

preview script not working

Check:

pnpm create @batijs/app --react --tailwindcss --authjs --express --eslint --prettier
cd my-app/
pnpm install

Output excerpt:

 WARN  6 deprecated subdependencies found: @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected]

Then

pnpm preview

and

curl localhost:3000

Output excerpt:

Server listening on http://localhost:3000
Error: [@brillout/[email protected]][Wrong Usage] Cannot find server entry. (Re-)build your app and try again. If you still get this error, then you may need to manually import the server entry, see https://github.com/brillout/vite-plugin-server-entry#manual-import
    at importServerEntry (/home/fl/tmp/my-app/node_modules/.pnpm/@[email protected]/node_modules/@brillout/vite-plugin-server-entry/dist/importServerEntry/index.js:51:29)
    at async loadImportBuild (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/globalContext/loadImportBuild.js:13:9)
    at async initGlobalContext (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/globalContext.js:75:30)
    at async renderPageAndPrepare (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/renderPage.js:66:9)
    at async renderPage_wrapper (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/renderPage.js:26:24)
    at async renderPage (file:///home/fl/tmp/my-app/node_modules/.pnpm/[email protected][email protected]/node_modules/vike/dist/esm/node/runtime/renderPage.js:46:50)
    at <anonymous> (/home/fl/tmp/my-app/express-entry.ts:75:25)

Can you please take a look into this?

If the preview script NODE_ENV=production tsx ./express-entry.ts would work, is it also suited to run in production? In VPS this is "server:prod": "cross-env NODE_ENV=production npm run server", is there any advantage using the former?

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting ':' near gy: "in-ra

Preset buttons

I think some preset buttons could be nice:

Plain Vike
For trying out Vike, or manually assembling your stack.

E-commerce
E-commerce website powered by Shopify.

Frontend only
If a backend isn't needed, or a backend already exists.

Full-stack
Frontend + Server + Database.

internationalization with inlang paraglide-js

Add Inlang Paraglide-js.

Personally I think inlang paraglide-js is by far the most modern, optimal and generic way of implementing internationalization, and I thought it would be awesome to have it on board.
Having a template working with the latest Vike and Solid-JS would be really awesome and alleviate the efforts to implement URL based internationalization.

In fact, inlang itself uses Vike and Solid JS as their website's stack, and it's publicly available in their monorepo

React with πŸ‘ to upvote this ticket.

Standalone Boilerplate

the starwars data in boilerplate is fetched from external data from other server, i hope it could be modified to be a simpler one that just fetching data from the project route itself.

Eslint

Add Eslint.

React with πŸ‘ to upvote this ticket.

Error page doesn't detect 404 properly in React

Describe the bug
404s are not detected. The is404 prop in the _error/+Page.tsx is always undefined. The Vue template has this right though, using the usePageContext: https://github.com/batijs/bati/blob/a51feb8d66ded70ecc4f82a5201a172c7fef40cf/boilerplates/vue/files/pages/_error/%2BPage.vue#L10

To Reproduce

  • Create an app with React
  • Visit a non existent page
  • Says '500 Internal Server Error'

Expected behavior

  • Should say '404 Page Not Found'

Additional context
This can even be observed on the batijs website: https://batijs.github.io/not-a-page

Question about react streaming

I created a new vite react using Bati with express, tailwind, vite and react.

When I serve the dev or preview I get this message in console about userAgent:

[[email protected]][Warning] HTML streaming (https://vike.dev/streaming) disabled because User Agent is unknown: make sure to provide pageContext.userAgent (typically with renderPage({ userAgent: req.headers['user-agent'] }), see https://vike.dev/renderPage) (so that HTML streaming can be disabled for bots such as Google Bot).

When I add userAgent in vike-handler.ts:

const pageContextInit = { ...context, urlOriginal: request.url, userAgent: request.headers.get('user-agent') };
  const pageContext = await renderPage(pageContextInit);

I get the error message:

Error: [[email protected]][Wrong Usage] Cannot inject following chunk after stream has ended:

What would be the correct way to do this? This is a default fresh install with Bati so maybe this can be improved?

Thanks

Missing file "./server/vike-handler.ts"

Describe the bug
When running a bati command in a local environment with a preset that includes express, the file "vike-handler.ts" is missing in the "./server" folder. Where it's present on the stackblitz corresponding example.
npm create @batijs/app --react --tailwindcss --express

To Reproduce
Just execute npm create @batijs/app --react --tailwindcss --express in a locale environment (Windows 11)

Svelte

Add Svelte.

React with πŸ‘ to upvote this ticket.

High-level questions, to help user take decisions

Is your website internal?

Yes => auto-select SPA. (FYI :ssr config.)

Does the content of your website change only occasionally?

Yes => auto-select Pre-rendering and GitHub Pages / Netlify.

Do you need a database?

Auto-select accordingly.

A neat thing is that it would enable us to show warnings if the user's selection doesn't make sense and/or isn't recommended.

Website: show a message for features incompatible with stackblitz

Describe the bug

On Stackblitz from https://batijs.dev:

~/projects/p8kcpu--run
❯ pnpm run dev

> [email protected] dev /home/projects/p8kcpu--run
> vite

failed to load config from /home/projects/p8kcpu--run/vite.config.ts
error when starting dev server:
Error: Could not locate the bindings file. Tried:
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Debug/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/out/Release/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/Release/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/default/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/compiled/18.20.3/linux/x64/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/release/install-root/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/debug/install-root/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/addon-build/default/install-root/better_sqlite3.node
 β†’ /home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/lib/binding/node-v108-linux-x64/better_sqlite3.node
    at resolveConfig (file:///home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:66484:24)
    at _createServer (file:///home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:63097:18)
    at CAC.eval (file:///home/projects/p8kcpu--run/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/cli.js:750:20)
 ELIFECYCLE  Command failed with exit code 1.

To Reproduce
image

pnpm create @batijs/app --solid --tailwindcss --auth0 --trpc --hono --drizzle --cloudflare --biome

--> Try on Stackblitz

Expected behavior
Working setup

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.