GithubHelp home page GithubHelp logo

edmundhung / remix-cloudflare-template Goto Github PK

View Code? Open in Web Editor NEW
246.0 4.0 55.0 685 KB

πŸ“œ All-in-one remix starter template for Cloudflare Pages

Home Page: https://remix-cloudflare-stack.pages.dev

License: MIT License

TypeScript 93.68% JavaScript 5.92% CSS 0.40%
remix remix-stack cloudflare-pages

remix-cloudflare-template's People

Contributors

edmundhung avatar therealflyingcoder avatar vinaypuppal 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

remix-cloudflare-template's Issues

How it works your playwright configuration.

I have a question about your playwright configuration.

I see you are using Vite to create a server, I have done something similar but with Express and using the code emitted by Remix's Esbuild.

My two questions are:

  • If I'm not mistaken, this configuration doesn't require a previous npm run build because we are using Vite directly.
  • Does the actual MSW configuration allow you the following situation?

Test A -> Mock Handler A with response X, B with response Y, C with response Z
Test B -> Mock Handler A with response H, B with response J

Chakra UI integration

And then, i start thinking, that all problems goes from chakra-ui integration…
I tried to do it, perfect guide here https://chakra-ui.com/guides/getting-started/remix-guide
(i found some other examples with chakra, but only for vercel... all my current stack is on cf, very want to make it work on workers....
but i encounter another problems, when i did everything in thus guide…
Because of some packages dependencies (dotenv and some other packages) when i trying to npm run start i got next errors…
Do you have any ideas how can it be fixed?
In old workers version in webpack conf i can simply resolve all modules like fs, stream etc to null … but what I can do in this situation, i tried some options but i didn’t find no real cure… Thanks in advance if you have any thoughts …

✘ [ERROR] Could not resolve "stream"

node_modules/through/index.js:1:21:
  1 β”‚ var Stream = require('stream')
    β•΅                      ~~~~~~~~

The package "stream" 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 "fs"

node_modules/dotenv/lib/main.js:24:19:
  24 β”‚ 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 "stream"

node_modules/multipipe/index.js:7:26:
  7 β”‚ var PassThrough = require('stream').PassThrough;
    β•΅                           ~~~~~~~~

The package "stream" 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/dotenv/lib/main.js:25:21:
  25 β”‚ const path = require('path')
     β•΅                      ~~~~~~

The package "path" 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 "stream"

node_modules/readable-stream/readable.js:1:21:
  1 β”‚ var Stream = require('stream'); // hack to fix a circular dependenc...
    β•΅                      ~~~~~~~~

The package "stream" 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 "os"

node_modules/dotenv/lib/main.js:26:19:
  26 β”‚ const os = require('os')
     β•΅                    ~~~~

The package "os" 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 "buffer"

node_modules/readable-stream/lib/_stream_writable.js:29:21:
  29 β”‚ var Buffer = require('buffer').Buffer;
     β•΅                      ~~~~~~~~

The package "buffer" 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 "buffer"

node_modules/readable-stream/lib/_stream_readable.js:30:21:
  30 β”‚ var Buffer = require('buffer').Buffer;
     β•΅                      ~~~~~~~~

The package "buffer" 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 "events"

node_modules/readable-stream/lib/_stream_readable.js:35:17:
  35 β”‚ var EE = require('events').EventEmitter;
     β•΅                  ~~~~~~~~

The package "events" 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 "stream"

node_modules/readable-stream/lib/_stream_readable.js:43:21:
  43 β”‚ var Stream = require('stream');
     β•΅                      ~~~~~~~~

The package "stream" 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 "buffer"

node_modules/core-util-is/lib/util.js:103:27:
  103 β”‚ exports.isBuffer = require('buffer').Buffer.isBuffer;
      β•΅                            ~~~~~~~~

The package "buffer" 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 "events"

node_modules/duplexer2/node_modules/readable-stream/lib/internal/streams/stream-browser.js:1:25:
  1 β”‚ module.exports = require('events').EventEmitter;
    β•΅                          ~~~~~~~~

The package "events" 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 "buffer"

node_modules/safe-buffer/index.js:2:21:
  2 β”‚ var buffer = require('buffer')
    β•΅                      ~~~~~~~~

The package "buffer" 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 "events"

node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js:42:17:
  42 β”‚ var EE = require('events').EventEmitter;
     β•΅                  ~~~~~~~~

The package "events" 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 "stream"

node_modules/readable-stream/lib/_stream_writable.js:40:21:
  40 β”‚ var Stream = require('stream');
     β•΅                      ~~~~~~~~

The package "stream" 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 "buffer"

node_modules/string_decoder/index.js:22:21:
  22 β”‚ var Buffer = require('buffer').Buffer;
     β•΅                      ~~~~~~~~

The package "buffer" 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.

Unknown error caught during build: Error: Build failed with 16 errors:
node_modules/core-util-is/lib/util.js:103:27: ERROR: Could not resolve "buffer"
node_modules/dotenv/lib/main.js:24:19: ERROR: Could not resolve "fs"
node_modules/dotenv/lib/main.js:25:21: ERROR: Could not resolve "path"
node_modules/dotenv/lib/main.js:26:19: ERROR: Could not resolve "os"
node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js:42:17: ERROR: Could not resolve "events"
...
at failureErrorWithLog (/Users/havok/Work/lawsvc/packages/ccremix/node_modules/esbuild/lib/main.js:1601:15)
at /Users/havok/Work/lawsvc/packages/ccremix/node_modules/esbuild/lib/main.js:1247:28
at runOnEndCallbacks (/Users/havok/Work/lawsvc/packages/ccremix/node_modules/esbuild/lib/main.js:1160:65)
at buildResponseToResult (/Users/havok/Work/lawsvc/packages/ccremix/node_modules/esbuild/lib/main.js:1245:7)
at /Users/havok/Work/lawsvc/packages/ccremix/node_modules/esbuild/lib/main.js:1354:14

process is not defined

can you give me an example how to load env variable from .env ?
already using dotenv but dont know how to use it

thank you

fetch() requests didn't work on workers but working at miniflare local dev

Hello!

I have tested fetch(), and axios request - in routes files - everything same - at worker, any request did't get any response... at local dev (miniflare) everything ok ....
and by the way, how i can use Cloudflare KV read/writ in *.server.ts files? I have added everything as usually but in this template seems like something works bit different...
Can you please show me a way...
Thanks in advance

Is the package maintained?

Also there doesn't seem to be many examples of Cloudflare Workers + Remix, pls link any other maintained solutions if possible.

Direct routes accessing

Hello, it’s me again ;)

I’m writing some sort of simple marketplace using chakra-ui template, can you take a brief look …

https://ccremix.bzz.workers.dev/dash

This is simple index page without any design and actions, you can access it via link above …

first link - goes to β€œ/β€œ, where in in action: redirect(/list);
second link - just to β€œ/list”

if you go to β€œ/β€œ or β€œ/list” via links - everything ok. but if you try to just reload this links or another direct access to any link with layout and with or without actions (no matter) - you got Unexpected Server Error
First what I see at console :

GET /list 500 Internal Server Error

…..

TypeError: Cannot read properties of null (reading 'registered')
at /Users/havok/Work/lawsvc/packages/ccremix/dist/worker.mjs:331:15250
at Object.render (/Users/havok/Work/lawsvc/packages/ccremix/dist/worker.mjs:53:94418)
at e.t.render (/Users/havok/Work/lawsvc/packages/ccremix/dist/worker.mjs:1:23821)
at e.t.read (/Users/havok/Work/lawsvc/packages/ccremix/dist/worker.mjs:1:22729)
at Object.l8.renderToString (/Users/havok/Work/lawsvc/packages/ccremix/dist/worker.mjs:3:573)

Do you have any ideas? I can show code, but nothing special there, just design and some fetches to API ….

Sorry for bother you again, and thanks in advance)

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.