Giter VIP home page Giter VIP logo

reflex's Introduction

Industrial

Hi, I'm Tom Wieland (he/him). On the Interwebz, I go by the name of Industrial. It's a Music Genre I like. I'm also into Hardcore Metal, Synthwave and Justin Bieber!

Contact

Network Account
Email [email protected]
Matrix @industrial:matrix.org
YouTube https://www.youtube.com/channel/UCfSCxWmv6yH8AE3m-lvVX4w
Discord https://discord.gg/F3E35cx
Twitch https://twitch.tv/Industri4l

Profession

I am a Senior Full Stack Developer with a decade's worth of experience on projects; architecting, designing, building, and delivering highly available and scalable full-stack solutions - improving current products/processes, adding new features, and building new products. I build websites, apps, platforms, interfaces and dashboards for different devices and networked services to handle traffic at scale; directing deliverables through all aspects of the software development lifecycle. I am an active opensource developer; exploring opportunities in Machine Learning and an avid learner of new tech stack and industry best practices.

Skills

JavaScript NodeJS React Redux NextJS Jest Enzyme

DevOps Docker Kubernetes GCP AWS

SQL NoSQL

World Views

Personality

INTJ-A

Political

Chart

reflex's People

Contributors

industrial avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

reflex's Issues

Compiler Bundle Command (3/3)

Add a command to bundle and compile the whole importMap.json tree into the cache directory at once. This command would be used as part of a production deployment.

Compiler Cache Directory (#1)

CacheDirectory: .tmp/ or .cache/.

  • Refactor the compiler so that the current in-memory cache of compiled files are saved in the CacheDirectory.
  • Hash each file before compiling and save the files in the CacheDirectory by Hash.
  • Don't compile files that are already cached and serve them immediately.

Unable to use `react-inspector` inside a Reflex app

Hi there,

I'm trying to convert a react app that uses react-inspector to Deno, and I thought I would give Reflex a try. However, I'm getting an error whenever I try to load the page.

Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at S (https://esm.sh/v83/[email protected]/deno/react.js:2:4838)
    at n.useMemo (https://esm.sh/v83/[email protected]/deno/react.js:2:6821)
    at ThemeAcceptor (https://esm.sh/v83/[email protected]/deno/react-inspector.js:4:5707)
    at renderWithHooks (https://esm.sh/v85/[email protected]/deno/server.development.js:9282:24)
    at renderIndeterminateComponent (https://esm.sh/v85/[email protected]/deno/server.development.js:9342:23)
    at renderElement (https://esm.sh/v85/[email protected]/deno/server.development.js:9506:15)
    at renderNodeDestructive (https://esm.sh/v85/[email protected]/deno/server.development.js:9598:17)
    at finishClassComponent (https://esm.sh/v85/[email protected]/deno/server.development.js:9307:11)
    at renderClassComponent (https://esm.sh/v85/[email protected]/deno/server.development.js:9315:11)
    at renderElement (https://esm.sh/v85/[email protected]/deno/server.development.js:9503:15)

Here is a repository based on create-reflex-app that reproduces the issue https://github.com/cowboyd/reflex-react-inspector Any idea what's happening here?

Unable to compile reflex app into an executable

I'd like to have an executable that takes an argument and starts the react app based on that argument. However, whenever I try to compile it there is an error. To reproduce, run deno compile server.ts from the create-reflex-app directory.

$ deno compile server.ts
Check create-reflex-app/server.ts
error: TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: CompileError, Global, Instance, LinkError, Memory, Module, RuntimeError, Table, ImportExportKind, TableKind, ValueType, ExportValue, Exports, ImportValue, ModuleImports, Imports, BufferSource, ErrorEvent, Worker, PerformanceEntryList, Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, CustomEvent
interface AddEventListenerOptions extends EventListenerOptions {
~~~~~~~~~
    at asset:///lib.dom.d.ts:25:1

    Conflicts are in this file.
    declare namespace WebAssembly {
    ~~~~~~~
        at asset:///lib.deno.shared_globals.d.ts:16:1

TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: DOMException, Event, EventTarget, EventListenerOrEventListenerObject, ProgressEvent, AbortController, BlobPart, Blob, File, ReadableStreamReader, size, MessageEvent, Transferable, MessageChannel, MessagePort
interface AddEventListenerOptions extends EventListenerOptions {
~~~~~~~~~
    at asset:///lib.dom.d.ts:25:1

    Conflicts are in this file.
    declare class DOMException extends Error {
    ~~~~~~~
        at asset:///lib.deno.web.d.ts:8:1

TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: FormDataEntryValue, HeadersInit, Headers, RequestInfo, RequestCache, RequestCredentials, RequestMode, RequestRedirect, ReferrerPolicy, BodyInit, RequestDestination, Request, ResponseType, Response
interface AddEventListenerOptions extends EventListenerOptions {
~~~~~~~~~
    at asset:///lib.dom.d.ts:25:1

    Conflicts are in this file.
    interface DomIterable<K, V> {
    ~~~~~~~~~
        at asset:///lib.deno.fetch.d.ts:8:1

TS2687 [ERROR]: All declarations of 'read' must have identical modifiers.
    read?: number;
    ~~~~
    at asset:///lib.dom.d.ts:1698:5

TS2687 [ERROR]: All declarations of 'written' must have identical modifiers.
    written?: number;
    ~~~~~~~
    at asset:///lib.dom.d.ts:1699:5

TS2687 [ERROR]: All declarations of 'highWaterMark' must have identical modifiers.
    readonly highWaterMark: number;
             ~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:2468:14

TS2300 [ERROR]: Duplicate identifier 'CloseEvent'.
interface CloseEvent extends Event {
          ~~~~~~~~~~
    at asset:///lib.dom.d.ts:3552:11

    'CloseEvent' was also declared here.
    declare class CloseEvent extends Event {
                  ~~~~~~~~~~
        at asset:///lib.deno.websocket.d.ts:14:15

TS2300 [ERROR]: Duplicate identifier 'CloseEvent'.
declare var CloseEvent: {
            ~~~~~~~~~~
    at asset:///lib.dom.d.ts:3561:13

    'CloseEvent' was also declared here.
    declare class CloseEvent extends Event {
                  ~~~~~~~~~~
        at asset:///lib.deno.websocket.d.ts:14:15

TS2687 [ERROR]: All declarations of 'highWaterMark' must have identical modifiers.
    readonly highWaterMark: number;
             ~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:3613:14

TS2374 [ERROR]: Duplicate index signature for type 'number'.
    [index: number]: string;
    ~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:4001:5

TS2300 [ERROR]: Duplicate identifier 'Location'.
interface Location {
          ~~~~~~~~
    at asset:///lib.dom.d.ts:8890:11

    'Location' was also declared here.
    declare class Location {
                  ~~~~~~~~
        at asset:///lib.deno.window.d.ts:153:15

TS2300 [ERROR]: Duplicate identifier 'Location'.
declare var Location: {
            ~~~~~~~~
    at asset:///lib.dom.d.ts:8952:13

    'Location' was also declared here.
    declare class Location {
                  ~~~~~~~~
        at asset:///lib.deno.window.d.ts:153:15

TS2300 [ERROR]: Duplicate identifier 'Navigator'.
    at asset:///lib.dom.d.ts:9669:11

    'Navigator' was also declared here.
    declare class Navigator {
                  ~~~~~~~~~
        at asset:///lib.deno.window.d.ts:70:15

TS2300 [ERROR]: Duplicate identifier 'Navigator'.
declare var Navigator: {
            ~~~~~~~~~
    at asset:///lib.dom.d.ts:9695:13

    'Navigator' was also declared here.
    declare class Navigator {
                  ~~~~~~~~~
        at asset:///lib.deno.window.d.ts:70:15

TS2430 [ERROR]: Interface 'ReadableStreamDefaultReader<R>' incorrectly extends interface 'ReadableStreamGenericReader'.
  Types of property 'closed' are incompatible.
    Type 'Promise<void>' is not assignable to type 'Promise<undefined>'.
      Type 'void' is not assignable to type 'undefined'.
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:11153:11

TS2374 [ERROR]: Duplicate index signature for type 'string'.
    [name: string]: any;
    ~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:13482:5

TS2300 [ERROR]: Duplicate identifier 'URL'.
interface URL {
          ~~~
    at asset:///lib.dom.d.ts:13989:11

    'URL' was also declared here.
    declare class URL {
                  ~~~
        at asset:///lib.deno.url.d.ts:155:15

TS2300 [ERROR]: Duplicate identifier 'URL'.
declare var URL: {
            ~~~
    at asset:///lib.dom.d.ts:14006:13

    'URL' was also declared here.
    declare class URL {
                  ~~~
        at asset:///lib.deno.url.d.ts:155:15

TS2300 [ERROR]: Duplicate identifier 'URLSearchParams'.
interface URLSearchParams {
          ~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:14016:11

    'URLSearchParams' was also declared here.
    declare class URLSearchParams {
                  ~~~~~~~~~~~~~~~
        at asset:///lib.deno.url.d.ts:8:15

TS2300 [ERROR]: Duplicate identifier 'URLSearchParams'.
declare var URLSearchParams: {
            ~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:14035:13

    'URLSearchParams' was also declared here.
    declare class URLSearchParams {
                  ~~~~~~~~~~~~~~~
        at asset:///lib.deno.url.d.ts:8:15

TS2300 [ERROR]: Duplicate identifier 'WebSocket'.
interface WebSocket extends EventTarget {
          ~~~~~~~~~
    at asset:///lib.dom.d.ts:16184:11

    'WebSocket' was also declared here.
    declare class WebSocket extends EventTarget {
                  ~~~~~~~~~
        at asset:///lib.deno.websocket.d.ts:42:15

TS2300 [ERROR]: Duplicate identifier 'WebSocket'.
declare var WebSocket: {
            ~~~~~~~~~
    at asset:///lib.dom.d.ts:16223:13

    'WebSocket' was also declared here.
    declare class WebSocket extends EventTarget {
                  ~~~~~~~~~
        at asset:///lib.deno.websocket.d.ts:42:15

TS2300 [ERROR]: Duplicate identifier 'Window'.
    at asset:///lib.dom.d.ts:16260:11

    'Window' was also declared here.
    declare class Window extends EventTarget {
                  ~~~~~~
        at asset:///lib.deno.window.d.ts:14:15

TS2300 [ERROR]: Duplicate identifier 'Window'.
declare var Window: {
            ~~~~~~
    at asset:///lib.dom.d.ts:16381:13

    'Window' was also declared here.
    declare class Window extends EventTarget {
                  ~~~~~~
        at asset:///lib.deno.window.d.ts:14:15

TS2300 [ERROR]: Duplicate identifier 'AlgorithmIdentifier'.
type AlgorithmIdentifier = Algorithm | string;
     ~~~~~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:17742:6

    'AlgorithmIdentifier' was also declared here.
    type AlgorithmIdentifier = string | Algorithm;
         ~~~~~~~~~~~~~~~~~~~
        at asset:///lib.deno.crypto.d.ts:18:6

TS2300 [ERROR]: Duplicate identifier 'HashAlgorithmIdentifier'.
type HashAlgorithmIdentifier = AlgorithmIdentifier;
     ~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.dom.d.ts:17777:6

    'HashAlgorithmIdentifier' was also declared here.
    type HashAlgorithmIdentifier = AlgorithmIdentifier;
         ~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.deno.crypto.d.ts:19:6

TS2300 [ERROR]: Duplicate identifier 'NamedCurve'.
type NamedCurve = string;
     ~~~~~~~~~~
    at asset:///lib.dom.d.ts:17787:6

    'NamedCurve' was also declared here.
    type NamedCurve = string;
         ~~~~~~~~~~
        at asset:///lib.deno.crypto.d.ts:31:6

TS2300 [ERROR]: Duplicate identifier 'BinaryType'.
type BinaryType = "arraybuffer" | "blob";
     ~~~~~~~~~~
    at asset:///lib.dom.d.ts:17816:6

    'BinaryType' was also declared here.
    type BinaryType = "arraybuffer" | "blob";
         ~~~~~~~~~~
        at asset:///lib.deno.websocket.d.ts:116:6

TS2300 [ERROR]: Duplicate identifier 'KeyFormat'.
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
     ~~~~~~~~~
    at asset:///lib.dom.d.ts:17862:6

    'KeyFormat' was also declared here.
    type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
         ~~~~~~~~~
        at asset:///lib.deno.crypto.d.ts:30:6

TS2300 [ERROR]: Duplicate identifier 'KeyType'.
type KeyType = "private" | "public" | "secret";
     ~~~~~~~
    at asset:///lib.dom.d.ts:17863:6

    'KeyType' was also declared here.
    type KeyType = "private" | "public" | "secret";
         ~~~~~~~
        at asset:///lib.deno.crypto.d.ts:20:6

TS2300 [ERROR]: Duplicate identifier 'KeyUsage'.
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
     ~~~~~~~~
    at asset:///lib.dom.d.ts:17864:6

    'KeyUsage' was also declared here.
    type KeyUsage =
         ~~~~~~~~
        at asset:///lib.deno.crypto.d.ts:21:6

TS2300 [ERROR]: Duplicate identifier 'URLPatternInput'.
declare type URLPatternInput = string | URLPatternInit;
             ~~~~~~~~~~~~~~~
    at asset:///lib.dom.extras.d.ts:26:14

    'URLPatternInput' was also declared here.
    declare type URLPatternInput = string | URLPatternInit;
                 ~~~~~~~~~~~~~~~
        at asset:///lib.deno.url.d.ts:188:14

TS2300 [ERROR]: Duplicate identifier 'URLPattern'.
declare class URLPattern {
              ~~~~~~~~~~
    at asset:///lib.dom.extras.d.ts:84:15

    'URLPattern' was also declared here.
    declare class URLPattern {
                  ~~~~~~~~~~
        at asset:///lib.deno.url.d.ts:246:15

TS2300 [ERROR]: Duplicate identifier 'Window'.
declare class Window extends EventTarget {
              ~~~~~~
    at asset:///lib.deno.window.d.ts:14:15

    'Window' was also declared here.
        at asset:///lib.dom.d.ts:16260:11    and here.
    declare var Window: {
                ~~~~~~
        at asset:///lib.dom.d.ts:16381:13

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'onerror' must be of type 'OnErrorEventHandler', but here has type '((this: Window, ev: ErrorEvent) => any) | null'.
declare var onerror: ((this: Window, ev: ErrorEvent) => any) | null;
            ~~~~~~~
    at asset:///lib.deno.window.d.ts:64:13

    'onerror' was also declared here.
    declare var onerror: OnErrorEventHandler;
                ~~~~~~~
        at asset:///lib.dom.d.ts:17518:13

TS2300 [ERROR]: Duplicate identifier 'Navigator'.
declare class Navigator {
              ~~~~~~~~~
    at asset:///lib.deno.window.d.ts:70:15

    'Navigator' was also declared here.
        at asset:///lib.dom.d.ts:9669:11    and here.
    declare var Navigator: {
                ~~~~~~~~~
        at asset:///lib.dom.d.ts:9695:13

TS2300 [ERROR]: Duplicate identifier 'Location'.
declare class Location {
              ~~~~~~~~
    at asset:///lib.deno.window.d.ts:153:15

    'Location' was also declared here.
    interface Location {
              ~~~~~~~~
        at asset:///lib.dom.d.ts:8890:11    and here.
    declare var Location: {
                ~~~~~~~~
        at asset:///lib.dom.d.ts:8952:13

TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: CompileError, Global, Instance, LinkError, Memory, Module, RuntimeError, Table, ImportExportKind, TableKind, ValueType, ExportValue, Exports, ImportValue, ModuleImports, Imports, BufferSource, ErrorEvent, Worker, PerformanceEntryList, Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, CustomEvent
declare namespace WebAssembly {
~~~~~~~
    at asset:///lib.deno.shared_globals.d.ts:16:1

    Conflicts are in this file.
    interface AddEventListenerOptions extends EventListenerOptions {
    ~~~~~~~~~
        at asset:///lib.dom.d.ts:25:1

TS2374 [ERROR]: Duplicate index signature for type 'number'.
  [index: number]: string;
  ~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.shared_globals.d.ts:379:3

TS2300 [ERROR]: Duplicate identifier 'CloseEvent'.
declare class CloseEvent extends Event {
              ~~~~~~~~~~
    at asset:///lib.deno.websocket.d.ts:14:15

    'CloseEvent' was also declared here.
    interface CloseEvent extends Event {
              ~~~~~~~~~~
        at asset:///lib.dom.d.ts:3552:11    and here.
    declare var CloseEvent: {
                ~~~~~~~~~~
        at asset:///lib.dom.d.ts:3561:13

TS2300 [ERROR]: Duplicate identifier 'WebSocket'.
declare class WebSocket extends EventTarget {
              ~~~~~~~~~
    at asset:///lib.deno.websocket.d.ts:42:15

    'WebSocket' was also declared here.
    interface WebSocket extends EventTarget {
              ~~~~~~~~~
        at asset:///lib.dom.d.ts:16184:11    and here.
    declare var WebSocket: {
                ~~~~~~~~~
        at asset:///lib.dom.d.ts:16223:13

TS2300 [ERROR]: Duplicate identifier 'BinaryType'.
type BinaryType = "arraybuffer" | "blob";
     ~~~~~~~~~~
    at asset:///lib.deno.websocket.d.ts:116:6

    'BinaryType' was also declared here.
    type BinaryType = "arraybuffer" | "blob";
         ~~~~~~~~~~
        at asset:///lib.dom.d.ts:17816:6

TS2300 [ERROR]: Duplicate identifier 'AlgorithmIdentifier'.
type AlgorithmIdentifier = string | Algorithm;
     ~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.crypto.d.ts:18:6

    'AlgorithmIdentifier' was also declared here.
    type AlgorithmIdentifier = Algorithm | string;
         ~~~~~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:17742:6

TS2300 [ERROR]: Duplicate identifier 'HashAlgorithmIdentifier'.
type HashAlgorithmIdentifier = AlgorithmIdentifier;
     ~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.crypto.d.ts:19:6

    'HashAlgorithmIdentifier' was also declared here.
    type HashAlgorithmIdentifier = AlgorithmIdentifier;
         ~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:17777:6

TS2300 [ERROR]: Duplicate identifier 'KeyType'.
type KeyType = "private" | "public" | "secret";
     ~~~~~~~
    at asset:///lib.deno.crypto.d.ts:20:6

    'KeyType' was also declared here.
    type KeyType = "private" | "public" | "secret";
         ~~~~~~~
        at asset:///lib.dom.d.ts:17863:6

TS2300 [ERROR]: Duplicate identifier 'KeyUsage'.
type KeyUsage =
     ~~~~~~~~
    at asset:///lib.deno.crypto.d.ts:21:6

    'KeyUsage' was also declared here.
    type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
         ~~~~~~~~
        at asset:///lib.dom.d.ts:17864:6

TS2300 [ERROR]: Duplicate identifier 'KeyFormat'.
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
     ~~~~~~~~~
    at asset:///lib.deno.crypto.d.ts:30:6

    'KeyFormat' was also declared here.
    type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
         ~~~~~~~~~
        at asset:///lib.dom.d.ts:17862:6

TS2300 [ERROR]: Duplicate identifier 'NamedCurve'.
type NamedCurve = string;
     ~~~~~~~~~~
    at asset:///lib.deno.crypto.d.ts:31:6

    'NamedCurve' was also declared here.
    type NamedCurve = string;
         ~~~~~~~~~~
        at asset:///lib.dom.d.ts:17787:6

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'label' must be of type 'BufferSource | undefined', but here has type 'Uint8Array | undefined'.
  label?: Uint8Array;
  ~~~~~
    at asset:///lib.deno.crypto.d.ts:111:3

    'label' was also declared here.
        label?: BufferSource;
        ~~~~~
        at asset:///lib.dom.d.ts:1558:5

TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: DOMException, Event, EventTarget, EventListenerOrEventListenerObject, ProgressEvent, AbortController, BlobPart, Blob, File, ReadableStreamReader, size, MessageEvent, Transferable, MessageChannel, MessagePort
declare class DOMException extends Error {
~~~~~~~
    at asset:///lib.deno.web.d.ts:8:1

    Conflicts are in this file.
    interface AddEventListenerOptions extends EventListenerOptions {
    ~~~~~~~~~
        at asset:///lib.dom.d.ts:25:1

TS2687 [ERROR]: All declarations of 'read' must have identical modifiers.
  read: number;
  ~~~~
    at asset:///lib.deno.web.d.ts:211:3

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'read' must be of type 'number | undefined', but here has type 'number'.
  read: number;
  ~~~~
    at asset:///lib.deno.web.d.ts:211:3

    'read' was also declared here.
        read?: number;
        ~~~~
        at asset:///lib.dom.d.ts:1698:5

TS2687 [ERROR]: All declarations of 'written' must have identical modifiers.
  written: number;
  ~~~~~~~
    at asset:///lib.deno.web.d.ts:212:3

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'written' must be of type 'number | undefined', but here has type 'number'.
  written: number;
  ~~~~~~~
    at asset:///lib.deno.web.d.ts:212:3

    'written' was also declared here.
        written?: number;
        ~~~~~~~
        at asset:///lib.dom.d.ts:1699:5

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'AbortSignal' must be of type '{ new (): AbortSignal; prototype: AbortSignal; }', but here has type '{ new (): AbortSignal; prototype: AbortSignal; abort(reason?: any): AbortSignal; timeout(milliseconds: number): AbortSignal; }'.
declare var AbortSignal: {
            ~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:306:13

    'AbortSignal' was also declared here.
    declare var AbortSignal: {
                ~~~~~~~~~~~
        at asset:///lib.dom.d.ts:1923:13

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'ReadableStreamDefaultReader' must be of type '{ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>; prototype: ReadableStreamDefaultReader<any>; }', but here has type '{ new <R>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>; prototype: ReadableStreamDefaultReader<any>; }'.
declare var ReadableStreamDefaultReader: {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:459:13

    'ReadableStreamDefaultReader' was also declared here.
    declare var ReadableStreamDefaultReader: {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:11158:13

TS2314 [ERROR]: Generic type 'ReadableStreamReader' requires 1 type argument(s).
  prototype: ReadableStreamReader;
             ~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:471:14

TS2314 [ERROR]: Generic type 'ReadableStreamReader' requires 1 type argument(s).
  new (): ReadableStreamReader;
          ~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:472:11

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'abort' must be of type 'UnderlyingSinkAbortCallback | undefined', but here has type 'WritableStreamErrorCallback | undefined'.
  abort?: WritableStreamErrorCallback;
  ~~~~~
    at asset:///lib.deno.web.d.ts:488:3

    'abort' was also declared here.
        abort?: UnderlyingSinkAbortCallback;
        ~~~~~
        at asset:///lib.dom.d.ts:1757:5

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'start' must be of type 'UnderlyingSinkStartCallback | undefined', but here has type 'WritableStreamDefaultControllerStartCallback | undefined'.
  start?: WritableStreamDefaultControllerStartCallback;
  ~~~~~
    at asset:///lib.deno.web.d.ts:490:3

    'start' was also declared here.
        start?: UnderlyingSinkStartCallback;
        ~~~~~
        at asset:///lib.dom.d.ts:1759:5

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'cancel' must be of type 'UnderlyingSourceCancelCallback | undefined', but here has type 'ReadableStreamErrorCallback | undefined'.
  cancel?: ReadableStreamErrorCallback;
  ~~~~~~
    at asset:///lib.deno.web.d.ts:496:3

    'cancel' was also declared here.
        cancel?: UnderlyingSourceCancelCallback;
        ~~~~~~
        at asset:///lib.dom.d.ts:1765:5

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'start' must be of type 'UnderlyingSourceStartCallback<R> | undefined', but here has type 'ReadableStreamDefaultControllerCallback<R> | undefined'.
  start?: ReadableStreamDefaultControllerCallback<R>;
  ~~~~~
    at asset:///lib.deno.web.d.ts:498:3

    'start' was also declared here.
        start?: UnderlyingSourceStartCallback<R>;
        ~~~~~
        at asset:///lib.dom.d.ts:1767:5

TS2687 [ERROR]: All declarations of 'highWaterMark' must have identical modifiers.
  highWaterMark: number;
  ~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:554:3

TS2687 [ERROR]: All declarations of 'highWaterMark' must have identical modifiers.
  highWaterMark: number;
  ~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:564:3

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'ReadableStream' must be of type '{ new <R = any>(underlyingSource?: UnderlyingSource<R> | undefined, strategy?: QueuingStrategy<R> | undefined): ReadableStream<R>; prototype: ReadableStream<...>; }', but here has type '{ new (underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number | undefined; size?: undefined; } | undefined): ReadableStream<Uint8Array>; new <R = any>(underlyingSource?: UnderlyingSource<...> | undefined, strategy?: QueuingStrategy<...> | undefined): ReadableStream<...>; prototype: ReadableStrea...'.
declare var ReadableStream: {
            ~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:595:13

    'ReadableStream' was also declared here.
    declare var ReadableStream: {
                ~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:11136:13

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'WritableStreamDefaultController' must be of type '{ new (): WritableStreamDefaultController; prototype: WritableStreamDefaultController; }', but here has type 'WritableStreamDefaultController'.
declare var WritableStreamDefaultController: WritableStreamDefaultController;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:654:13

    'WritableStreamDefaultController' was also declared here.
    declare var WritableStreamDefaultController: {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:16522:13

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'closed' must be of type 'Promise<undefined>', but here has type 'Promise<void>'.
  readonly closed: Promise<void>;
           ~~~~~~
    at asset:///lib.deno.web.d.ts:661:12

    'closed' was also declared here.
        readonly closed: Promise<undefined>;
                 ~~~~~~
        at asset:///lib.dom.d.ts:16529:14

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'ready' must be of type 'Promise<undefined>', but here has type 'Promise<void>'.
  readonly ready: Promise<void>;
           ~~~~~
    at asset:///lib.deno.web.d.ts:663:12

    'ready' was also declared here.
        readonly ready: Promise<undefined>;
                 ~~~~~
        at asset:///lib.dom.d.ts:16531:14

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'WritableStreamDefaultWriter' must be of type '{ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>; prototype: WritableStreamDefaultWriter<any>; }', but here has type '{ new (): WritableStreamDefaultWriter<any>; prototype: WritableStreamDefaultWriter<any>; }'.
declare var WritableStreamDefaultWriter: {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:670:13

    'WritableStreamDefaultWriter' was also declared here.
    declare var WritableStreamDefaultWriter: {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:16538:13

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'TransformStreamDefaultController' must be of type '{ new (): TransformStreamDefaultController<any>; prototype: TransformStreamDefaultController<any>; }', but here has type 'TransformStreamDefaultController<any>'.
declare var TransformStreamDefaultController: TransformStreamDefaultController;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.web.d.ts:696:13

    'TransformStreamDefaultController' was also declared here.
    declare var TransformStreamDefaultController: {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:13936:13

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'start' must be of type 'TransformerStartCallback<O> | undefined', but here has type 'TransformStreamDefaultControllerCallback<O> | undefined'.
  start?: TransformStreamDefaultControllerCallback<O>;
  ~~~~~
    at asset:///lib.deno.web.d.ts:701:3

    'start' was also declared here.
        start?: TransformerStartCallback<O>;
        ~~~~~
        at asset:///lib.dom.d.ts:1733:5

TS2374 [ERROR]: Duplicate index signature for type 'string'.
  [name: string]: any;
  ~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.deno.webstorage.d.ts:36:3

TS2300 [ERROR]: Duplicate identifier 'URLSearchParams'.
declare class URLSearchParams {
              ~~~~~~~~~~~~~~~
    at asset:///lib.deno.url.d.ts:8:15

    'URLSearchParams' was also declared here.
    interface URLSearchParams {
              ~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:14016:11    and here.
    declare var URLSearchParams: {
                ~~~~~~~~~~~~~~~
        at asset:///lib.dom.d.ts:14035:13

TS2300 [ERROR]: Duplicate identifier 'URL'.
declare class URL {
              ~~~
    at asset:///lib.deno.url.d.ts:155:15

    'URL' was also declared here.
    interface URL {
              ~~~
        at asset:///lib.dom.d.ts:13989:11    and here.
    declare var URL: {
                ~~~
        at asset:///lib.dom.d.ts:14006:13

TS2300 [ERROR]: Duplicate identifier 'URLPatternInput'.
declare type URLPatternInput = string | URLPatternInit;
             ~~~~~~~~~~~~~~~
    at asset:///lib.deno.url.d.ts:188:14

    'URLPatternInput' was also declared here.
    declare type URLPatternInput = string | URLPatternInit;
                 ~~~~~~~~~~~~~~~
        at asset:///lib.dom.extras.d.ts:26:14

TS2300 [ERROR]: Duplicate identifier 'URLPattern'.
declare class URLPattern {
              ~~~~~~~~~~
    at asset:///lib.deno.url.d.ts:246:15

    'URLPattern' was also declared here.
    declare class URLPattern {
                  ~~~~~~~~~~
        at asset:///lib.dom.extras.d.ts:84:15

TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: FormDataEntryValue, HeadersInit, Headers, RequestInfo, RequestCache, RequestCredentials, RequestMode, RequestRedirect, ReferrerPolicy, BodyInit, RequestDestination, Request, ResponseType, Response
interface DomIterable<K, V> {
~~~~~~~~~
    at asset:///lib.deno.fetch.d.ts:8:1

    Conflicts are in this file.
    interface AddEventListenerOptions extends EventListenerOptions {
    ~~~~~~~~~
        at asset:///lib.dom.d.ts:25:1

TS2403 [ERROR]: Subsequent variable declarations must have the same type.  Variable 'FormData' must be of type '{ new (form?: HTMLFormElement | undefined): FormData; prototype: FormData; }', but here has type '{ new (): FormData; prototype: FormData; }'.
declare var FormData: {
            ~~~~~~~~
    at asset:///lib.deno.fetch.d.ts:42:13

    'FormData' was also declared here.
    declare var FormData: {
                ~~~~~~~~
        at asset:///lib.dom.d.ts:5296:13

TS2717 [ERROR]: Subsequent property declarations must have the same type.  Property 'window' must be of type 'null | undefined', but here has type 'any'.
  window?: any;
  ~~~~~~
    at asset:///lib.deno.fetch.d.ts:250:3

    'window' was also declared here.
        window?: null;
        ~~~~~~
        at asset:///lib.dom.d.ts:1522:5

Found 79 errors.

Cache ResolvedImports

Import resolving is done every time. This takes a lot of time. We could cache the ResolvedImports based on a hash of the ImportMap.

Support compiling Reflex app into an executable

I would like to be able to distribute an entire web application as a compiled ahead-of-time executable that has all bundled dependencies, including the web app itself so that it can be used as a dependency free tool.

Once compiled, this single file should not need to download anything upon invocation. Specifically it should contain:

  • Deno.
  • reflex
  • react, react-dom, et al.
  • compiled app code

Things it should not need to do upon invocation:

  • d/l from esm.sh
  • d/l from deno.land
  • Ideally, it would not even need read/write access to the cache because the cache would have been pre-generated ahead of time.

Deno has support much of this with the deno compile command which downloads and compiles the tree of dependencies starting at its entry point, but where to put the web application and static assets is another matter. Upon cursory inspection, I found these libraries out there for bundling assets with an Deno executable.

In both cases, it appears that the assets themselves are encoded as binary data within typescript files. Reflex would just need to support some sort of adapter to load its cache and other assets from some type of store.

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.