farm-fe / farm

Extremely fast Vite-compatible web build tool written in Rust
https://farmfe.org
MIT License
4.74k stars 158 forks source link

[Bug Report]: Errors when running Svelte 5 RC #1403

Closed garth closed 1 month ago

garth commented 2 months ago

Steps to reproduce

Install the svelte template and update to svelte 5 RC

pnpm add -D svelte@next

Reproduce link

No response

What is actually happening?

[ building ] ⠂ transform (18) src/App.svelte
[ Farm ] Failed to start the server:
 Error: Can not resolve `esm-env` from node_modules/.pnpm/svelte@5.0.0-next.155/node_modules/svelte/src/internal/shared/errors.js.
Original error: None.

Potential Causes:
1.The file that `esm-env` points to does not exist.
2.Install it first if `esm-env` is an dependency from node_modules, if you are using pnpm refer to [https://pnpm.io/faq#pnpm-does-not-work-with-your-project-here] for solutions.
3. If `esm-env` is a alias, make sure your alias config is correct.

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 89.67 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.1 - ~/.volta/tools/image/node/20.13.1/bin/node
    pnpm: 9.3.0 - ~/.volta/bin/pnpm
  npmPackages:
    @farmfe/core: ^1.1.15 => 1.1.15
ErKeLost commented 1 month ago

This problem has been solved, but I found that hmr does not take effect. We are rebuilding hmr, and soon we will further support svelte.

ErKeLost commented 1 month ago

@garth svelte5 now works fine try it