Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_modules in dist folder #458

Closed
1 task
lorenzolewis opened this issue Aug 3, 2023 · 2 comments
Closed
1 task

node_modules in dist folder #458

lorenzolewis opened this issue Aug 3, 2023 · 2 comments

Comments

@lorenzolewis
Copy link
Contributor

What version of starlight are you using?

0.6.1

What version of astro are you using?

2.10.0

What package manager are you using?

pnpm

What operating system are you using?

macOS and Linux (GitHub Codespace)

What browser are you using?

N/A

Describe the Bug

There appear to be 2 files that aren't cleaned up as part of running pnpm astro build:

  • dist/node_modules/.pnpm/@astrojs+starlight@0.6.1_astro@2.10.0/node_modules/@astrojs/starlight/404.astro.mjs
  • dist/node_modules/.pnpm/@astrojs+starlight@0.6.1_astro@2.10.0/node_modules/@astrojs/starlight/index.astro.mjs

The content inside the index.astro.mjs looks like this:

export { renderers } from '../../../../../../renderers.mjs';
export { onRequest } from '../../../../../../_empty-middleware.mjs';
import '../../../../../../chunks/astro.2c0550c5.mjs';

const page = () => import('../../../../../../chunks/pages/index.astro.301b0b80.mjs');

export { page };

The contents of 404.astro.mjs is the same but referencing the 404 files instead.

Note: I wasn't able to get this to reproduce in Stackblitz but got it locally on a macOS M1 Pro (macOS 13.4 (22F66)) and also on a GitHub Codespace environment.

Link to Minimal Reproducible Example

https://github.com/lorenzolewis/starlight-bug-test

Participation

  • I am willing to submit a pull request for this issue.
@HiDeoo
Copy link
Member

HiDeoo commented Aug 3, 2023

From a quick check, it looks like this may be an issue introduced in Astro v2.5.6 as v2.5.5 does not reproduce the issue for me.

There already has been issues with Starlight related to this specific version, e.g. withastro/astro#7397 where it was suggested this could be related to withastro/astro#7193 which updated the build strategy.

If confirmed that this is an issue starting with Astro v2.5.6, maybe it would be worth moving this issue to the Astro repo?

@lorenzolewis
Copy link
Contributor Author

You're the best @HiDeoo , just did a build against those two and can confirm it seems to be introduced in v2.5.6. I'll close this one out and open it over in the Astro repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants