netlify / cli

Netlify Command Line Interface
http://cli.netlify.com
MIT License
1.58k stars 358 forks source link

SvelteKit local development with CLI is not loading CSS #5190

Open brittneypostma opened 2 years ago

brittneypostma commented 2 years ago

Describe the bug

When running ntl dev locally in a SvelteKit application, the CSS bundle 404s and does not apply any CSS to the application. (See screenshot)

image

Steps to reproduce

  1. Have a SvelteKit app locally or create a new sveltekit app npm create svelte and follow prompts to install deps. a. Choose demo app from CLI if creating a new app to see CSS applied
  2. Run ntl dev, port should open to localhost://8888, but no CSS is applied.

Configuration

[build]
  command = "vite build"
  functions = "netlify/functions"
  publish = "build"

Environment

  System:
    OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (16) x64 Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz
    Memory: 12.97 GB / 15.57 GB
    Container: Yes
    Shell: 5.0.16 - /bin/bash
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
  npmGlobalPackages:
    netlify-cli: 11.8.2
vhollo commented 1 year ago

After deleting the .svelte-kit folder, npm run build, ntl dev is back to work.