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

Preprocess failed for DisplaySettings.svelte. #281

Closed
RiverKy opened this issue Jan 11, 2025 · 14 comments
Closed

Preprocess failed for DisplaySettings.svelte. #281

RiverKy opened this issue Jan 11, 2025 · 14 comments

Comments

@RiverKy
Copy link

RiverKy commented Jan 11, 2025

$ npx astro build
23:48:40 [types] Generated 187ms
23:48:40 [build] output: "static"
23:48:40 [build] directory: /Users/RiverKy/Documents/Kais-Blog.nosync/dist/
23:48:40 [build] Collecting build info...
23:48:40 [build] ✓ Completed in 226ms.
23:48:40 [build] Building static entrypoints...
23:48:41 [ERROR] [vite] x Build failed in 1.32s
[vite-plugin-svelte] [plugin vite-plugin-svelte] src/components/widget/DisplaySettings.svelte (51:15): src/components/widget/DisplaySettings.svelte:51:15 Expected a valid CSS identifier
https://svelte.dev/e/css_expected_identifier

- Did you forget to add a stylus preprocessor? See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md for more information.
file: /Users/RiverKy/Documents/Kais-Blog.nosync/src/components/widget/DisplaySettings.svelte:51:15

 49 |        input[type="range"]
 50 |          -webkit-appearance none
 51 |          height 1.5rem
                      ^
 52 |          background-image var(--color-selection-bar)
 53 |          transition background-image 0.15s ease-in-out

  Location:
    src/components/widget/DisplaySettings.svelte:51:15
  Stack trace:

@L4Ph
Copy link
Contributor

L4Ph commented Jan 12, 2025

use

pnpm run build
or
npm run build

do not use
npx or pnpm dlx

@RiverKy
Copy link
Author

RiverKy commented Jan 12, 2025 via email

@L4Ph
Copy link
Contributor

L4Ph commented Jan 13, 2025

@RiverKy

Please provide one of the following, as this is necessary to reproduce.

  • Target repository url
  • A repository that is not the target repository, but has equivalent changes

@ibra-kdbra
Copy link

This error is bugging me, the stylus syntax is really fine, I am developing this not building it using pnpm run dev, the same error above is persisting..

@ibra-kdbra
Copy link

I tried to downgrade the versions of the deps, packages in the .json file, it works fine, but when updating with this commits, the error re-occur.

@L4Ph
Copy link
Contributor

L4Ph commented Jan 22, 2025

@ibra-kdbra
Oops, I found the cause. I'll fix it, so please wait a moment.

@L4Ph
Copy link
Contributor

L4Ph commented Jan 22, 2025

It seems that @sveltejs/vite-plugin-svelte disappeared when the main branch was merged at some point.

pnpm add -D @sveltejs/vite-plugin-svelte

should resolve the issue even with the latest commit.

@L4Ph
Copy link
Contributor

L4Ph commented Jan 22, 2025

This was my mistake.
I really appreciate you raising the issue.

@RiverKy @ibra-kdbra

@L4Ph
Copy link
Contributor

L4Ph commented Jan 22, 2025

I check this issue.
but pnpm run dev is worked.

@L4Ph
Copy link
Contributor

L4Ph commented Jan 22, 2025

import { vitePreprocess } from "@astrojs/svelte";

@ibra-kdbra
Copy link

Already fixed it, thanks for quick response tho..

@RiverKy
Copy link
Author

RiverKy commented Jan 22, 2025

Yeah I can see a conclusion here but I don't have the permission to close this issue. You personnels may proceed.

@L4Ph
Copy link
Contributor

L4Ph commented Jan 22, 2025

Yeah I can see a conclusion here but I don't have the permission to close this issue. You personnels may proceed.

An issue can only be closed by the owner of this repository or the person who opened it. Can you close it?

@RiverKy
Copy link
Author

RiverKy commented Jan 22, 2025

Closed #281.
Okay signed out and back in and I can choose to close this. GitHub's fault.

@RiverKy RiverKy closed this as completed Jan 22, 2025
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

3 participants