#Javascript not executing

62 messages · Page 1 of 1 (latest)

grizzled compass
#
    at hydrate$1 (chunk-7AJMTGTN.js?v=21c60a0b:326:23)
    at hydrate (chunk-7AJMTGTN.js?v=21c60a0b:688:10)
    at mount (mount.js?v=21c60a0b:80:10)
    at entry-client.tsx:4:1```
#
    at (index):140:69926
client:789 [vite] connecting...
chunk-32CBI3N4.js?v=aa89031f:326 Uncaught TypeError: Cannot read properties of undefined (reading 'done')
    at entry-client.tsx:4:1
#

i am working with solid start , project was working fine , but suddenly after coming back and starting the server , nothing was working , css was loading slowly , no single javascript is working

full parrot
#

missing _$HY means that the HydrationScript is missing

grizzled compass
#
import { mount, StartClient } from "@solidjs/start/client";

mount(() => <StartClient />, document.getElementById("app")!);```
this?
full parrot
grizzled compass
# full parrot no it's a server-side thing. What does your server entry look like
import { createHandler, StartServer } from "@solidjs/start/server";

export default createHandler(() => (
  <StartServer
    document={({ assets, children, scripts }) => (
      <html lang="en">
        <head>
          <meta charset="utf-8" />
          <meta name="viewport" content="width=device-width, initial-scale=1" />
          <link rel="icon" href="/logo.png" />
          <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:[email protected]&display=swap" rel="stylesheet"></link>
          <link href="https://fonts.googleapis.com/css2?family=Anton&display=swap" rel="stylesheet"></link>
          <link href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap" rel="stylesheet"></link>
          <link href="https://fonts.googleapis.com/css2?family=Rubik:[email protected]&display=swap" rel="stylesheet"/>
          <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap" rel="stylesheet"></link>
          <link href="https://fonts.googleapis.com/css2?family=Orbitron:[email protected]&display=swap" rel="stylesheet"></link>
          
        </head>
        <body>
          <div id="app">{children}</div>
          {scripts}
        </body>
      </html>
    )}
  />
));
#

default ig

full parrot
#

hmm okay interesting. @grizzled compass what's your SSR mode? sync, async or stream?

grizzled compass
#
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
  vite: {
    plugins: [tailwindcss()]
  }
});
#

just tailwind

full parrot
grizzled compass
#

lemme do lock file also

#

i mean it also get regenerated at npm i but did again nothing helped

grizzled compass
#

i donno bro what happened suddenly javascript just refuses to execute

full parrot
#

I think it's rm node_modules/.vite && rm node_modules/.cache && rm .output

full parrot
grizzled compass
full parrot
#

yeah I figured

#

btw does the error happen only on prod and not in dev?

grizzled compass
#

i am in local

#

i was working last to last night i , then i gotta go so i closed the vs code butwhen i reopened again everything broke

#

it's just this

grizzled compass
#

@full parrot :(

#
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "jsx": "preserve",
    "jsxImportSource": "solid-js",
    "allowJs": true,
    "noEmit": true,
    "strict": true,
    "types": ["vinxi/types/client"],
    "isolatedModules": true,
    "paths": {
      "~/*": ["./src/*"]
    }
  }
}
``` my ts config
full parrot
full parrot
#

or both

grizzled compass
#

but ig should be the same

grizzled compass
full parrot
#

the hydration script was missing from the html for some reason

#

it was to be included in the SSR

#

it was an inline script

grizzled compass
#

btw inline js is working. cause ig it's not included in hydration

#

but anyway so .. what can i do now?

full parrot
grizzled compass
#

hm

full parrot
grizzled compass
#

should i give you remove access or what?

full parrot
#

Okay I think I'll have to see the initial HTML

#

try view-source

#

I needed to know what the page looks like on initial request

grizzled compass
full parrot
#

view-source:<url>

#

in your browser

#

or just right-click your page and View Source

grizzled compass
#

hm hm

#

wait

full parrot
#

okay yeah so the hydration script is indeed missing

#

let me check something

full parrot
#
// @refresh reload
import { createHandler, StartServer } from "@solidjs/start/server";

export default createHandler(() => (
  <StartServer
    document={({ assets, children, scripts }) => (
      <html lang="en">
        <head>
          <meta charset="utf-8" />
          <meta name="viewport" content="width=device-width, initial-scale=1" />
          <link rel="icon" href="/favicon.ico" />
          {assets}
        </head>
        <body>
          <div id="app">{children}</div>
          {scripts}
        </body>
      </html>
    )}
  />
));

setup should be like this

grizzled compass
#

is it possible me to ignore this and copy new font on assests

#

anyway thanks..