mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
fix: replace @remix-run/node imports with @remix-run/cloudflare for compatibility
- Update all auth-related routes to use @remix-run/cloudflare imports - Fix GitHub OAuth server utilities to use Cloudflare-compatible session storage - Resolve build failures caused by Node.js-specific modules in browser bundle - Enable successful production builds for EKS deployment This resolves the 'Cannot access xs before initialization' error by ensuring all imports are compatible with the Cloudflare Workers runtime environment.
This commit is contained in:
parent
b983302406
commit
c255d00973
@ -1,5 +1,5 @@
|
||||
import { OAuthApp } from '@octokit/oauth-app';
|
||||
import { createCookieSessionStorage, redirect } from '@remix-run/node';
|
||||
import { createCookieSessionStorage, redirect } from '@remix-run/cloudflare';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
// Define types for GitHub user data
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { json, type LoaderFunctionArgs } from '@remix-run/node';
|
||||
import { json, type LoaderFunctionArgs } from '@remix-run/cloudflare';
|
||||
import {
|
||||
getUserFromSession,
|
||||
isAuthenticated,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { json, redirect, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/node';
|
||||
import { json, redirect, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/cloudflare';
|
||||
import { useLoaderData } from '@remix-run/react';
|
||||
import {
|
||||
AuthError,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { json, redirect, type ActionFunctionArgs, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/node';
|
||||
import { json, redirect, type ActionFunctionArgs, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/cloudflare';
|
||||
import { Form, useActionData, useLoaderData, useNavigation } from '@remix-run/react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { generateState, getAuthorizationUrl, isAuthenticated, storeState } from '~/lib/auth/github-oauth.server';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { json, redirect, type ActionFunctionArgs, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/node';
|
||||
import { json, redirect, type ActionFunctionArgs, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/cloudflare';
|
||||
import { Form, useLoaderData, useNavigation } from '@remix-run/react';
|
||||
import { useEffect } from 'react';
|
||||
import { logout, getUserFromSession } from '~/lib/auth/github-oauth.server';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { json, redirect, type ActionFunctionArgs, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/node';
|
||||
import { json, redirect, type ActionFunctionArgs, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/cloudflare';
|
||||
import { Form, useActionData, useLoaderData, useNavigation } from '@remix-run/react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { getUserFromSession, isAuthenticated, requireAuthentication } from '~/lib/auth/github-oauth.server';
|
||||
|
Loading…
Reference in New Issue
Block a user