Comments (4)
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
from nx-extensions.
+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 localhost:4200
I get this error logged to the console:
ailed to load url /.svelte-kit/generated/server/internal.js (resolved id: /.svelte-kit/generated/server/internal.js). Does the file exist?
12:15:09 PM [vite] Error when evaluating SSR module /node_modules/@sveltejs/kit/src/runtime/server/index.js: failed to import "/.svelte-kit/generated/server/internal.js"
|- Error: Failed to load url /.svelte-kit/generated/server/internal.js (resolved id: /.svelte-kit/generated/server/internal.js) in /path/to/my/nx/workspace/node_modules/@sveltejs/kit/src/runtime/server/index.js. Does the file exist?
at loadAndTransform (file:///path/to/my/nx/workspace/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53376:21)
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 apps/*
directory.
Output from nx report
:
Node : 18.16.1
OS : linux-x64
npm : 9.5.1
nx : 17.0.1
@nx/js : 17.0.1
@nx/jest : 17.0.1
@nx/linter : 17.0.1
@nx/eslint : 17.0.1
@nx/workspace : 17.0.1
@nx/cypress : 17.0.1
@nx/devkit : 17.0.1
@nx/eslint-plugin : 17.0.1
@nrwl/tao : 17.0.1
@nx/vite : 17.0.1
typescript : 5.1.6
---------------------------------------
Community plugins:
@nxext/svelte : 17.0.1
@nxext/sveltekit : 17.0.1
@wanews/nx-pulumi : 0.27.0
from nx-extensions.
@dgrbrady delete the .svelte-kit
folder and restart the server or the vscode. The following problem will be solved.
Failed to load url /.svelte-kit/generated/server/internal.js
The files in the .svelte-kit
should be like this
Copy the folders src
and static
from apps/your-sveltekit-app/
to the root. The following problem will be solved.
src\app.html does not exist
But the folder structure is not supposed to be like this.
When the server starts, there is a message:
The following Vite config options will be overridden by SvelteKit:
- root
The server is loaded from the default source path. I tried to update the svelte.config.js
to assign the new files path, but it doesn't work. This config file wasn't loaded at all.
I move the svelte.config.js
to the root of the nx file path. It was loaded then.
I'm still checking how to fix this. Hope someone could advise the right path. Thank you!
from nx-extensions.
To make the svelte.config.js
work in the root of the NX project, I have to add "type": "module",
in the package.json
which will break other NX apps. Here I attach thesvelte.config.js
file.
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;
from nx-extensions.
Related Issues (20)
- Svelte: Wrong path when using importPath flag
- Svelte: NX throws error when using the tsConfiguration flag with storybook
- Svelte: storybook generator fail if NOT using eslintrc JSON file HOT 1
- Ionic React: dependenies error with nx v17.0.3
- Sveltekit: Directory option doesn't work
- Stencil : npm install error - No matching version found for @storybook/manager-webpack5
- Stencil: conflicting peer dependencies on `npm i @nxext/stencil` HOT 2
- Stencil - adding Angular outputtarget throws Cannot read properties of undefined (reading 'kind') HOT 3
- Angular: Failed to fetch dynamically imported module .angular/cache/17.0.8/vite/deps/ion-app_8.entry.js?import HOT 7
- Solid: nx integrated monorepo vite config
- Stencil: Creating a buildable library throws an exception HOT 7
- Stencil: Adding output target type Angular leads to an exception HOT 2
- React: Capacitor live reload not working
- Stencil: missing support for Nx latest version (v18) HOT 1
- Sveltekit: Upgrade default versions and allow user overrides via CLI options
- Stencil: Always get 'Cannot find tsconfig.base.json'
- Sveltekit: NX console plugin inside vscode breaks after making an app
- Stencil: `Cannot read properties of undefined (reading 'validateConfig')` HOT 2
- Stencil: `Cannot convert undefined or null to object`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-extensions.