Docs: add yarn workaround to node integration docs (#4978)
* Add yarn workaround to troubleshooting section * npm can also cause this error
This commit is contained in:
parent
9683ae64ff
commit
0bd6dddfcf
1 changed files with 21 additions and 1 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue