Hi, I’m trying to use the Netlify image CDN to deliver images to my sveltekit site. I’m trying to test it using the netlify dev
command to test it locally.
When I run netlify dev
i get the following console output:
◈ Netlify Dev ◈
◈ Injecting environment variable values for all scopes
◈ Ignored general context env var: LANG (defined in process)
◈ Ignored site settings env var: MAPBOX_API_ACCESS_TOKEN (defined in .env file)
◈ Injected .env file env var: MAPBOX_API_ACCESS_TOKEN
◈ Injected site settings env var: NETLIFY_AUTH_TOKEN
◈ Injected netlify.toml file env var: NODE_ENV
◈ Injected netlify.toml file env var: targetport
◈ Injected netlify.toml file env var: port
◈ Injected netlify.toml file env var: command
◈ Injected netlify.toml file env var: framework
◈ Injected .env file env var: BASE_URL
◈ Setting up local development server
Cleaned up .netlify\functions-internal.
◈ Starting Netlify Dev with SvelteKit
> 19mil-site-2024@0.0.1 dev
> vite dev
VITE v5.0.12 ready in 1592 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
✔ Waiting for framework port 5173. This can be configured using the 'targetPort' property in the netlify.toml
┌─────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:8888 │
│ │
└─────────────────────────────────────────────────┘
◈ Rewrote URL to /.netlify/functions/sveltekit-render.js
Request from ::ffff:127.0.0.1: GET /.netlify/functions/sveltekit-render.js
Response with status 404 in 2 ms.
And when I visit localhost:8888
i get a 404 response saying 'funtion not found . . . ’
This is the Dev Context in my netlify.toml:
# Dev context: environment variables set here
# are available for local development environments
# run using Netlify Dev. These values can be
# overwritten on branches that have a more specific
# branch context configured.
[context.dev.environment]
NODE_ENV = "development"
targetport = 5173
port = 8888
command = "npm run dev"
framework = "custom"
I’m not trying to use any edge functions. My .netlify/ directory has the following structure:
.netlify/
- blobs-serve/
-functions-internal/
-plugins/
-server/
-servless.js
-shims.js
-state.json
Let me know if any other information is required to help fix.
Thanks in advance.