edmundhung / remix-cloudflare-template Goto Github PK
View Code? Open in Web Editor NEWπ All-in-one remix starter template for Cloudflare Pages
Home Page: https://remix-cloudflare-stack.pages.dev
License: MIT License
π All-in-one remix starter template for Cloudflare Pages
Home Page: https://remix-cloudflare-stack.pages.dev
License: MIT License
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
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
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:
npm run build
because we are using Vite directly.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
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)
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
Also there doesn't seem to be many examples of Cloudflare Workers + Remix, pls link any other maintained solutions if possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.