pao ramen
Explore posts from serversCDCloudflare Developers
•Created by pao ramen on 12/21/2024 in #workers-help
I can't deploy: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
I get a nasty error and can't deploy. I don't know what to do:
00:37:15.245 Executing user command: pnpm run build
00:37:15.894
00:37:15.895 > [email protected] build /opt/buildhome/repo/apps/fika-client 00:37:15.895 > tsc && vite build 00:37:15.895
00:40:30.956
00:40:30.956 <--- Last few GCs ---> 00:40:30.956
00:40:30.957 [1119:0x573c400] 191072 ms: Mark-sweep 4040.3 (4130.9) -> 4024.8 (4131.4) MB, 1975.2 / 0.0 ms (average mu = 0.097, current mu = 0.005) allocation failure; scavenge might not succeed 00:40:30.957 [1119:0x573c400] 193111 ms: Mark-sweep 4040.8 (4131.4) -> 4025.3 (4131.9) MB, 2025.1 / 0.0 ms (average mu = 0.053, current mu = 0.007) allocation failure; scavenge might not succeed 00:40:30.957
00:40:30.957
00:40:30.957 <--- JS stacktrace ---> 00:40:30.957
00:40:30.957 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 00:40:30.957 1: 0xb83f50 node::Abort() [node] 00:40:30.957 2: 0xa94834 [node] 00:40:30.957 3: 0xd647c0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [node]
00:37:15.895 > [email protected] build /opt/buildhome/repo/apps/fika-client 00:37:15.895 > tsc && vite build 00:37:15.895
00:40:30.956
00:40:30.956 <--- Last few GCs ---> 00:40:30.956
00:40:30.957 [1119:0x573c400] 191072 ms: Mark-sweep 4040.3 (4130.9) -> 4024.8 (4131.4) MB, 1975.2 / 0.0 ms (average mu = 0.097, current mu = 0.005) allocation failure; scavenge might not succeed 00:40:30.957 [1119:0x573c400] 193111 ms: Mark-sweep 4040.8 (4131.4) -> 4025.3 (4131.9) MB, 2025.1 / 0.0 ms (average mu = 0.053, current mu = 0.007) allocation failure; scavenge might not succeed 00:40:30.957
00:40:30.957
00:40:30.957 <--- JS stacktrace ---> 00:40:30.957
00:40:30.957 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 00:40:30.957 1: 0xb83f50 node::Abort() [node] 00:40:30.957 2: 0xa94834 [node] 00:40:30.957 3: 0xd647c0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [node]
1 replies
CDCloudflare Developers
•Created by pao ramen on 9/28/2024 in #pages-help
Astro + env vars
I really want to use cloudflare, but every time I stumble upon errors or documentation gaps. Let's see if I can come out from this one:
I'm building an Astro application with the cloudflare adapter. I've already built one in the past, and on the old, I was using
import.meta.env
for environment variables with no problem.
But for this new one, it seems like they don't work.
I've read the documentation in Astro, and it says that I need to use proxyRuntime: { enabled: true }
and then access them through const { env } = Astro.locals.runtime
, which is weird because this means that I know have to pass the secrets around? Can't I use env variables at build time to set things like the db url or stripe tokens?
ok. I keep reading. It looks like I need a wrangler.toml file, but I already have the pages configured through the dashboard and I have no idea how to translate those. Luckily, there is a command npx wrangler pages download config
that is supposed to do that. But when I run it I hit:
Error: listen EADDRINUSE: address already in use ::1:8976
at Server.setupListenHandle [as _listen2] (node:net:1872:16)
at listenInCluster (node:net:1920:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:2075:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:8)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1899:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'EADDRINUSE',
errno: -48,
syscall: 'listen',
address: '::1',
port: 8976
}
I just want to deploy Astro with env variables. Can someone help?2 replies
scroll restoration
For some reason, when using solid-router, it does not do scroll restoration properly. I have a list of elements, I scroll to the bottom, I click on one element and when I hit the back button. Customers expect to go back to the bottom of that list, but for some reason it scrolls to the top. I've tried to debug it, and it does not call scrollToHash so I really don't know what else to look at.
Thanks in advance!
16 replies
How do I "curry" a function with props?
I have a method "colorize" that receives two arguments: hue and shade. A component has a props.hue and I want to curry that function. I can't do it with createMemo since the accessor does not receive a parameter. How would you do it?
```
function colorize(hue, shade) { ... }
function Component(props: Props) {
const color = colorize.bind(null, props.hue) // not reactive!
return <span color={color(100)}>hello</span>
}
4 replies