-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing "vite-manifest.json" file on build #10268
Comments
Is the ... an absolute path replaced or was it actually there in the message? |
An absolute path replaced for privacy, apologies if that was confusing. |
Check if the issue occurs in a new blank project deployed on GitLab. |
Sorry for the long delay -- yes, the problem also occurs with the default starter SvelteKit app. Again the Vite build log is saying that a |
It's removed after the build is done so that's expected at least but I don't see why it'd behave differently on GitLab. kit/packages/kit/src/exports/vite/index.js Line 797 in a7bffde
The plugin name from the error, |
Isn't this it? kit/packages/kit/src/exports/vite/index.js Lines 477 to 479 in a7bffde
It's the same error on the demo project, with nothing extra added. I'm wondering if there's a race condition happening, because in the logs I do see the "done ..." lines from the build output at the same time the error appears. So it seems as though the build completes, but then that last plugin is running too late to still have the |
@gtm-nayan Is there any more information I can give to help with this? It looks like the “awaiting submitter” tag is still applied. |
Ah sorry, I forgot to send the comment I had typed out. The plugin name is missing |
Ah, sorry, I did copy it over incorrectly. The error does reference The relevant part of the build log I see is:
The full path of the error uses a mix of
The double |
The double built in lines are for the two vite client and server builds I think which should be fine. Although the logs seem out of order, I'm confused why the adapter log would show up above the others when it should be at the end. Could you please share the blank project that reproduced the issue on gitlab with the CI scripts configured? |
They both seem to be associated with the server build, curiously:
It almost seems as though something in the server build is trying to happen twice? The blank project used is the default Sverdle app with nothing extra enabled. The CI is a little funky because the system doesn't have internet access, so it's copying a pre-populated set of node modules over: image: node:latest
.deploy-template:
stage: deploy
script:
- "if (-not (Test-Path: P:\\)) { net use P: \\\\drive\\name\folder }"
- $env:NODE_HOME = "P:\\software\\<path>\\node\\node-19.6.1"
- $env:PATH = "$env:NODE_HOME;$env:PATH"
- cp "P:\\software\\<path>\\node_modules_archive.zip" .
- Expand-Archive -Path "node_modules_archive.zip"
- mv node_modules_archive/node_modules node_modules
- npm run build
- mv build public
artifacts:
paths:
- public
when: always
tags:
- executor:powershell
pages:
extends: [.deploy-template]
only:
- main (Copied over manually, so may have typos.) |
Somewhat unsurprisingly, if I comment out the following lines: kit/packages/kit/src/exports/vite/index.js Lines 796 to 798 in a7bffde
the build goes through just fine. But, looking at the logs, the server build is run twice... |
I have the same issue here. It's happening with Ionic Extension for VS Code when you want to run application in Android Emulator in combination with Capacitor. And it happens only there and only if the application was already built once using the extension, the first run works just fine for me. If I just close VS Code and run the application is going to be built just fine. Also if I run application via One workaround for now that I suggest is that you use |
That’s interesting, but my use case is entirely different since I’m seeing the issue in a GitLab runner, not within the VS Code terminal. @gtm-nayan Do you have any idea why the server build might run twice under any circumstances? |
Same issue here on VSCode with internet access and node adapter. |
If you rewind the kit/Vite packages a few versions, how far back do you have to go before the deployment works? |
Just adding my comment as I have this issue as well. (Windows 11, Svelte 3.59.2, Kit 1.22.3, Adapter-Static 2.0.3, Vite 4.4.7, currently using Node 16.18.1) I have a very simple, default setup to build a non-SPA static site. The build process does successfully complete and then the error pops up just as described in the original issue above. For what it's worth, I don't see the issue when running the site with "vite dev" I don't remember this being an issue when I first setup Svelte for my project, originally with Svelte 3.54.0, Kit 1.0.13, Adapter-Static 1.0.1 and Vite 4.0.0. Edit: Did testing and figured out where the issue begin. See next post... |
Okay, summary of results from testing:
If you want to test it out yourself, here's a snippet from package.json for an environment that works correctly (no error):
And one that does NOT work, outputting the error originally reported:
You'll see that the only difference is SvelteKit. Note that adapter-static is capped at v1.0.6 for SvelteKit v1.3.0. Hope this helps solve the mystery. Edit: Narrowed-in on exact minor versions from further testing I also noticed that one of the pull requests from 1.3.1 ( #8636 ) mentioned in the 1.3.1 release notes contains changes directly related to where the manifest file is loaded from. Might be a good starting point. Hope that helps. |
Thanks @kiddailey Can confirm when running |
Same for me, locking kit at 1.3.0 and adapter-static at 1.0.6 fixes the issue. @Rich-Harris Sorry for the ping, but as the author of #8636 do you have any ideas about why it might be causing the server build to run twice under certain circumstances? |
@benmccann Since you reviewed #8636, do you have any ideas about why it might cause the server build to run twice? I'm seeing the issue on (one of) my GitLab runners, and it seems like other people are experiencing the same problem. The issue can be worked around by locking to SvelteKit 1.3.0 and adapter-static 1.0.6, but this is obviously non-ideal. |
One observation I made is running |
I do have the same issue when trying to run the Playwright tests in VSCode. It fails with this error when executing from the "Playwright Test for VSCode" extension, but works like a charm when running I also confirm that as @stephenlrandall said above, commenting those two lines in |
Describe the bug
Building a SvelteKit application on one of my GitLab runners breaks with:
[vite-plugin-svelte-compile] ENOENT: no such file or directory, open '.../.svelte-kit/output/client/vite-manifest.json'
On my local machine, the build is fine. I was curious about the
vite-manifest.json
file, and it looks like it's actually generated:But if I go inspect that folder after the build is complete, that file isn't present. Does it get deleted at some point? Is there any chance of a race condition happening?
The exact line that spawns the error is:
kit/packages/kit/src/exports/vite/index.js
Line 717 in e8d8587
Reproduction
I don't know how to reproduce this, it's only happening on a system I don't control.
Logs
No response
System Info
System doesn't have external internet access, but it's using: @sveltejs/adapter-static: 2.0.2 @sveltejs/kit: 1.15.7 svelte: 3.58.0 vite: 4.3.2
Severity
blocking all usage of SvelteKit
Additional Information
Apologies for the lack of a good reproduction, more so just trying to understand where to continue debugging the issue.
The text was updated successfully, but these errors were encountered: