-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Sveltekit: New app errors #1058
Comments
+1 to this, I'm seeing this as well. Also thought I'd mention that running the serve executor yields the same "src/app.html" does not exist error. And when I go to
Not sure if the 2 are related, but guidance or suggestions is greatly appreciated! I'm on ubuntu and am trying to generate a sveltekit app under my Output from
|
@dgrbrady delete the
The files in the Copy the folders
But the folder structure is not supposed to be like this. When the server starts, there is a message:
The server is loaded from the default source path. I tried to update the I'm still checking how to fix this. Hope someone could advise the right path. Thank you! |
To make the Looking for a working solution. import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
files: {
routes: 'apps/web/src/routes',
}
},
};
export default config; |
Has this issue been resolved? I have the exact same issue and can't find a workable solution. Under no condition is it practical to have src in root for a micro service application |
Hello! I created a PR on the Sveltekit repo that should fix the issue. If anyone wants to try it, I would appreciate any review!! You only need to add the
|
As @Anthony-Jhoiro mentioned, this is discussed in sveltejs/kit#12410 and sveltejs/kit#12420 I created a Feature Request for Sveltekit to have better support for Nx and looked more into what Nx does behind the scenes in sveltejs/kit#12499 It looks like Nx should not be hardcoded to use cwd as process.cwd() but should allow an override as other monorepos like yarn, pnmp etc. do. @dominikg I'm not sure this is needed, you can just set the cwd when invoking the scripts instead:
Perhaps it should call export interface RunOptions {
dir: string;
// more ...
}
export function withRunOptions<T>(yargs: Argv<T>): Argv<T & RunOptions> {
return withVerbose(withExcludeOption(yargs))
.option('dir', {
describe: 'The dir to use as current working directory',
type: 'string',
})
await import('./run-one').then((m) =>
// set process cwd if args dir is set to override default
if (args.dir) {
process.chdir(args.dir)
}
m.runOne(process.cwd(), withOverrides(args))
); These changes would have to be made in Nx core in https://github.com/nrwl/nx/blob/master/packages/nx/src/command-line/run/run-one.ts |
Describe the bug
Building a new Sveltekit app has the build error:
error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'verbatimModuleSyntax' instead.
After replacing importsNotUsedAsValues with verbatimModuleSyntax, the build throws the following error:
src\app.html does not exist
To Reproduce
Expected behavior
The the freshly created app builds and runs
The text was updated successfully, but these errors were encountered: