How to fix the ReferenceError: global is not defined error in SvelteKit/Vite

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • vite

    Next generation frontend tooling. It's fast!

  • SvelteKit uses Vite as its build tool which is great because Vite pre-bundles dependencies using esbuild which is really really fast. But by default, Vite doesn't include shims for NodeJS variables so these need to be added by the user.

  • Dragula

    :ok_hand: Drag and drop so simple it hurts

  • https://github.com/vitejs/vite/issues/2778 https://github.com/vitejs/vite/issues/728 https://github.com/bevacqua/dragula/issues/602 https://kit.svelte.dev/faq#aliases

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • SvelteKit

    web development, streamlined (by sveltejs)

  • I spent hours trying to figure this out and it was really difficult to find the exact information on the web since this error message is very similar to an Angular issue. However, the Angular solution is useless for SvelteKit so, I thought I'd put this post together.

  • esbuild

    An extremely fast bundler for the web

  • SvelteKit uses Vite as its build tool which is great because Vite pre-bundles dependencies using esbuild which is really really fast. But by default, Vite doesn't include shims for NodeJS variables so these need to be added by the user.

  • Angular

    Deliver web apps with confidence 🚀

  • I spent hours trying to figure this out and it was really difficult to find the exact information on the web since this error message is very similar to an Angular issue. However, the Angular solution is useless for SvelteKit so, I thought I'd put this post together.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: I made a programmable computer from NAND gates

    3 projects | news.ycombinator.com | 25 Apr 2024
  • Vitest In-Source Testing for SFC in Vue?

    3 projects | dev.to | 16 Apr 2024
  • In-Depth guide for TypeScript Library

    4 projects | dev.to | 13 Nov 2023
  • JavaScript Gom Jabbar

    12 projects | news.ycombinator.com | 2 Jul 2023
  • [AskJS] Advantages of Rollup over other bundlers for creating libraries?

    3 projects | /r/javascript | 9 May 2023