summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Dan Jutan <danjutan@gmail.com> 2022-10-06 10:37:58 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-06 10:37:58 -0400
commit0bd6dddfcf4b690f7c9d3382afc58bb3a45ce377 (patch)
tree51363c5bb99803509eadd27c4274e0a9d9699b10
parent9683ae64ffae8e5ca78e1ec6c6bcd4d90b6be294 (diff)
downloadastro-0bd6dddfcf4b690f7c9d3382afc58bb3a45ce377.tar.gz
astro-0bd6dddfcf4b690f7c9d3382afc58bb3a45ce377.tar.zst
astro-0bd6dddfcf4b690f7c9d3382afc58bb3a45ce377.zip
Docs: add yarn workaround to node integration docs (#4978)
* Add yarn workaround to troubleshooting section * npm can also cause this error
-rw-r--r--packages/integrations/node/README.md22
1 files changed, 21 insertions, 1 deletions
diff --git a/packages/integrations/node/README.md b/packages/integrations/node/README.md
index 10fbded95..7c95dd0ea 100644
--- a/packages/integrations/node/README.md
+++ b/packages/integrations/node/README.md
@@ -110,7 +110,27 @@ This adapter does not expose any configuration options.
## Troubleshooting
-For help, check out the `#support` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help!
+### SyntaxError: Named export 'compile' not found
+
+You may see this when running the entry script if it was built with npm or Yarn. This is a [known issue](https://github.com/withastro/astro/issues/4974) that will be fixed in a future release. As a workaround, add `"path-to-regexp"` to the `noExternal` array:
+
+```js title="astro.config.mjs" ins={8-12}
+import { defineConfig } from 'astro/config';
+
+import node from "@astrojs/node";
+
+export default defineConfig({
+ output: "server",
+ adapter: node(),
+ vite: {
+ ssr: {
+ noExternal: ["path-to-regexp"]
+ }
+ }
+});
+```
+
+For more help, check out the `#support` channel on [Discord](https://astro.build/chat). Our friendly Support Squad members are here to help!
You can also check our [Astro Integration Documentation][astro-integration] for more on integrations.