npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

setup-tanstack-netlify

v1.0.4

Published

CLI tool to set up Lovable-generated TanStack Start React SSR apps for deployment on Netlify

Readme

setup-tanstack-netlify

A zero-config CLI utility to prepare and deploy Lovable-generated TanStack Start (React SSR) applications to Netlify in seconds.


The Problem

Lovable (lovable.dev) builds dynamic full-stack applications using TanStack Start v1 (React 19 + Vite + Nitro SSR engine), configuring Cloudflare Workers as the default edge target.

If you try to deploy this project directly to Netlify:

  1. Netlify 404 Errors: Netlify treats the project as a static SPA, resulting in 404 "Page Not Found" errors on all SSR-rendered pages.
  2. Third-Party Mismatches: The default TanStack Start dependencies contain unresolved bugs (missing cheerio devDependency, incorrect import paths in @tanstack/start-plugin-core, and missing runtime configuration fallbacks).

What This CLI Does

Running this tool in your target project root automates all required configuration changes:

  • Auto-Detects Package Manager: Identifies npm, bun, pnpm, or yarn via lockfiles.
  • Installs Missing Dependencies: Adds cheerio as a devDependency.
  • Generates netlify.toml: Configures Netlify with a catch-all rewrite (/* -> /.netlify/functions/server), Netlify-compatible Nitro presets (NITRO_PRESET = "netlify"), and Node 20 environment.
  • Updates vite.config.ts: Removes the Cloudflare-specific server entry point (server: { entry: "server" }), allowing Nitro to compile using its default Netlify-compatible entry point.
  • Injects Post-Install Hotfixes: Registers a lightweight scripts/patch-tanstack.js file and adds it to your project's postinstall step. This automatically patches known @tanstack/start-plugin-core bugs in node_modules (specifically fixing the escapeRegExp import path and adding a fallback value for injectedHeadScripts).
  • Updates Git Ignore: Appends .netlify/ to .gitignore to keep local build artifacts out of Git.

Quick Start

Run the following command directly in the root directory of your Lovable-generated TanStack Start project:

npx setup-tanstack-netlify

Deploying to Netlify

Once the setup tool completes, you can deploy your application:

Option A: Connected Git Repository (Recommended)

Simply commit all generated files and push them to your repository (GitHub, GitLab, etc.). When Netlify builds the site, it will read netlify.toml, run the postinstall patch, and build the SSR application automatically.

Option B: Netlify CLI

  1. Log in and link your project:
    netlify login
    netlify link
  2. Build and deploy:
    netlify deploy --build --prod

Local Development & Contribution

If you want to contribute or modify this package locally:

  1. Clone this repository.
  2. Link the package globally to test changes:
    npm link
  3. Run the CLI tool inside any test project root:
    setup-tanstack-netlify

License

MIT