All Questions
90 questions
0
votes
0
answers
152
views
Using OpenAI on a vitual enviroment via node.js
I've wanted to try my hand into working with AI and opted to try OpenAI or Olama. I'm currently using Sveltekit to create my website. I've followed a few courses where they used a virual enviroment ...
0
votes
0
answers
959
views
Vite build stuck on 'modules transform'
While building a svelte application with vite, the build process gets stuck on 'modules transform'. No error is reported on the building logs.
I've tried several things, including but not limited to:
...
5
votes
1
answer
4k
views
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "package.json" needs an import attribute of "type: json"
There are no errors when launching the application, and the application functions normally, but if you log in to the server logs, a permanent error appears.
Error in the logs:
2024-03-23_04:59:51....
1
vote
1
answer
349
views
Downloading images from external source and saving to $lib or static at build time
I have a Sveltekit project set up with adapter-static. I'm pulling in content for my pages from Directus. I'm hosting my images in S3, which is hooked up to my Directus instance so that I can use the ...
1
vote
1
answer
507
views
Svelte 4 Route Not Found After Refreshing the Page on Production Mode
I'm trying out a frontend framework Svelte 4 on my local machine using Ubuntu 20.04.
I have a critical problem: when I run in development mode (npm run dev) and navigate to the route /quote/1, ...
1
vote
1
answer
257
views
Invalid Selection Range when I attempt to extract component from svelte
I'm just learning svelte, so I may be doing something terribly wrong.
Anyways, when I try to extract my button component, whether I set the component name to ./Button.svelte, ./Button, Button.svelte, ...
0
votes
1
answer
305
views
Error: SyntaxError: Unexpected token '??=' [duplicate]
I recently tried to upload some of my svelte-kit code to a cPanel node.js app, but got an error saying that "??=" was an unexpected token. I was looking through the code, and found the line ...
3
votes
1
answer
3k
views
How to serve a static JS file in SvelteKit?
I have a JS file that creates an iframe element and appends it to the body. I am planning on having it be used by other websites as a widget. I have it stored in src/lib/static/embed.js. If I am ...
0
votes
1
answer
187
views
Svelte cannot import
Im a svelte beginner and im trying to do simple feedback app, i have 2 files one with app and second with list of feedbacks
App.svelte
<script>
import feedback from "./components/...
0
votes
1
answer
526
views
Is it possible to send Images to an Express API with SvelteKit `on:change` using Form Actions?
I have an SvelteKit app which communicates with an Express API to save user's data.
I have a form with an input file, and I am sending the image to my Express server using Form Actions.
The problem is ...
0
votes
1
answer
601
views
Get items from specific folder as array in electron
I want to get the item returns as array of files. I already get a string path with dialog.showOpenDialog({properties:['openDirectory']}. Apparently, I can't find a proper method to get the items from ...
0
votes
0
answers
511
views
how to export data in SvelteKit?
I have a problem exporting user data, for export 'currentUserData' and 'triggerUpdate' to 'ContentDashboardUser'.
ContentDashboardUser.svelte
<script lang="ts">
import { scale } from ...
0
votes
1
answer
532
views
SvelteKit server loaded data shows on sources/index on chrome
I'm building a simple web app that uses self-hosted Pocketbase on backend, and SvelteKit as a meta framework.
I just noticed my server loaded data's are being shown in browser's sources/index file.
...
4
votes
1
answer
2k
views
Bug? Vercel says import error but local works fine
Github Link
I'm trying to host my SvelteKit portfolio site to Vercel, yet it keeps throwing me the error
RollupError: Could not resolve "../../utilities/isLoggedIn" from "src/routes/...
0
votes
1
answer
399
views
Resolving MIME checking for .svelte file when uploading to Firebase
I have been working on a static webpage offline, and it works when I deploy it locally. I have now been trying to upload it to Firebase hosting, and have configured CLI etc. and can run the hosting. ...