I am trying, unsuccessfully, to deploy the render-examples default sveltekit project to render.
I have copied the render-examples/sveltekit template into a public repository in my github account
I have changed nothing in this repository
I created a new static site on render and linked it to my github repo
I have set the build and run commands as directed
The build starts, then fails with a message that “Unrecognized option ‘enableSourcemap’”
Apparently, enableSourcemap requires svelte build 3.44 but the devDependency in render-examples default project package.lock.json is 3.34. I presume the project is rebuilt automatically by render when I update the repo, or click on the manual update button on my render dashboard. And I also presume that there is no way for a user to update svelte on render. I am very much a noobie here. If I have made an obvious error, or omitted some necessary step, please clue me in.
Hi @dmorgorg, welcome to the Render community! I just tested the repository template and it should work fine as is. Can you try changing your publish directory to public?
When I do the build locally, remove /build from .gitignore and push the changes to my github repo, then set up a new static site to this repo using the default empty build arguments, I get a message that the build is successfully deployed. However, when I click on the link to the site, I get a 404.
When I replace /build in .gitignore and attempt to do the build on render with npm install && npm run build, the build fails. Changing the publish directory to /public doesn’t help because the build has failed and, presumably, there is nothing to publish.
Hi Dave, my apologies - it seems I was looking at the svelte repo rather than sveltekit. I cloned the sveltekit repo and was able to reproduce the same enableSourcemap error. Changing the svelte version to 3.44.0 (as you specified) in the repo seemed to fix it, but I’m not sure why Render is not pulling the latest minor version automatically. I’m following up internally to look into this further!
Thanks, Jade.
Good to know that I’m not totally inept!
I edited the devDependency in package.json to 3.44 and now have a build! And notification that the site is live.
But when I visit the site, (eduk8r.onrender.com) I’m getting a ‘Not found’ message. I would expect to see the default Sveltekit app.
Cheers, Dave