Skip to content

Commit

Permalink
Merge pull request #195 from QwikDev/node-error
Browse files Browse the repository at this point in the history
Node error
  • Loading branch information
thejackshelton authored Dec 28, 2024
2 parents 7029713 + 8d25080 commit 9eb04c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-pandas-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@qwikdev/astro": patch
---

refactor: improved errors for older node versions
2 changes: 1 addition & 1 deletion libs/qwikdev-astro/q-astro-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{"manifestHash":"2kpemp","symbols":{"s_0DHRa0FqCj4":{"origin":"../../../libs/qwikdev-astro/src/root.tsx","displayName":"root.tsx_root_component","canonicalFilename":"root.tsx_root_component_0DHRa0FqCj4","hash":"0DHRa0FqCj4","ctxKind":"function","ctxName":"component$","captures":false,"loc":[81,136]},"s_qY02pQHKSts":{"origin":"components/qwik/counter.tsx","displayName":"counter.tsx_Counter_component","canonicalFilename":"counter.tsx_Counter_component_qY02pQHKSts","hash":"qY02pQHKSts","ctxKind":"function","ctxName":"component$","captures":false,"loc":[121,322]},"s_WDqUvWziK5k":{"origin":"components/qwik/counter.tsx","displayName":"counter.tsx_Counter_component_Fragment_button_onClick","canonicalFilename":"counter.tsx_Counter_component_Fragment_button_onClick_WDqUvWziK5k","hash":"WDqUvWziK5k","ctxKind":"eventHandler","ctxName":"onClick$","captures":true,"parent":"s_qY02pQHKSts","loc":[235,256]}},"mapping":{"s_0DHRa0FqCj4":"q-CXpka_yH.js","s_qY02pQHKSts":"q-4LT-psvh.js","s_WDqUvWziK5k":"q-Cf-M9i3S.js"},"bundles":{"q-4LT-psvh.js":{"size":88,"imports":["q-Cf-M9i3S.js","q-CXpka_yH.js"],"symbols":["s_qY02pQHKSts"]},"q-Cf-M9i3S.js":{"size":1635,"imports":["q-CXpka_yH.js"],"origins":["src/components/qwik/counter.tsx_Counter_component_Fragment_button_onClick_WDqUvWziK5k.js","src/components/qwik/counter.tsx_Counter_component_qY02pQHKSts.js"],"symbols":["s_WDqUvWziK5k"]},"q-CXpka_yH.js":{"size":61657,"origins":["../../libs/qwikdev-astro/src/root.tsx_root_component_0DHRa0FqCj4.js","../../node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_/node_modules/@builder.io/qwik/dist/core.prod.mjs","@builder.io/qwik/build"],"symbols":["s_0DHRa0FqCj4"]},"q-FfniopH8.js":{"size":184,"imports":["q-Cf-M9i3S.js","q-CXpka_yH.js"],"dynamicImports":["q-CXpka_yH.js"],"origins":["../../libs/qwikdev-astro/src/root.tsx"]},"q-fzuY5JUw.js":{"size":171,"imports":["q-Cf-M9i3S.js","q-CXpka_yH.js"],"dynamicImports":["q-4LT-psvh.js"],"origins":["src/components/qwik/counter.tsx"]}},"injections":[],"version":"1","options":{"target":"client","buildMode":"production","entryStrategy":{"type":"smart"}},"platform":{"qwik":"1.12.0","vite":"","rollup":"4.29.1","env":"node","os":"darwin","node":"22.12.0"}}
15 changes: 12 additions & 3 deletions libs/qwikdev-astro/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,18 @@ export async function renderToStaticMarkup(
"q-astro-manifest.json"
);

const integrationManifest = manifestPath
? await import(/* @vite-ignore */ manifestPath, { with: { type: "json" } })
: null;
let integrationManifest = null;
if (manifestPath) {
try {
integrationManifest = await import(/* @vite-ignore */ manifestPath, {
with: { type: "json" }
});
} catch (error) {
throw new Error(
`@qwikdev/astro: This integration requires Node version 22 or higher. If this is local, check your node version with node -v. If this is a deployment, check your deployment provider's environment variables.`
);
}
}

const renderToStreamOpts: RenderToStreamOptions = {
containerAttributes: { style: "display: contents" },
Expand Down

0 comments on commit 9eb04c2

Please sign in to comment.