-
-
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
Cannot run a newly created project #2001
Comments
I noticed after pasting my system info that the project was running on node 12.x. After switching to the LTS with nvm and recreating the project everything then worked. |
Got the same problem also with node 14.17.3. |
Have the same issue, was just installing node 14.17.3 LTS to test |
Here is the error
|
Work around is to explicitly use svelte version 3.40.1, |
Turns out that sveltejs/svelte#6089 is the root cause of this issue, checking out that commit triggers the error mentioned above |
@itseMeCode @s0kil I can't reproduce this with a fresh SvelteKit project, although I haven't tried every permutation of options in the starter script. What are you doing that's leading you to this issue, what package manager are you using, etc? |
@Conduitry I'm using pnpm, node 14.17.3, a starter svelte kit project with the static adapter. Created the project with |
I can't reproduce this with |
I've created a new, typescript, eslint, prettier project, added adapter static, updated the packages to latest versions and the error is the same:
Here is the repo: https://github.com/s0kil/svelte-kit-issue-2001 |
Im also getting this error. Clean install (JS, eslint and prettier), skeleton project. Tried switching to node v12 with nvm, still getting error. |
it seems only the skeleton project is affected. I have been working on creating a lint based carbon skeleton since yesterday, and had made a commit with the last working skeleton: https://github.com/basaran/sveltekit-carbon It seems the new one being created is different too. Don't have the layout file. |
Same problem here after bumping svelte/kit to 1.0.0-next.137. |
my yarn.lock from last night is still working with the new skeleton if you copy it prior to https://github.com/basaran/sveltekit-carbon/blob/master/yarn.lock |
As @s0kil suggested, downgrading to |
Hey Guys, Example:Let's create a new skeleton project. <script>
0;
</script>
<slot /> Add the following content to index.svelte file: <script>
0;
</script>
<p>
Try editing <strong>src/routes/index.svelte</strong>
</p>
And this seems to fix this issue somehow. Maybe one of SvelteKit's maintainers/contributors can throw some light on it. I am using node 14.17.0. |
I'm running NPM @ 7.20.1, Node @ 14.7.3, with Svelte kit @ 1.0.0-next.137. When running with Svelte @ 3.40.1 there is no issue but updating to 3.40.2 throws the following:
The file in question should be The file is referenced as One thing I've noticed is that direct child imports inside of As mentioned by others rolling back to 3.40.1 resolves. |
Also worth saying that this throws in dev but on Vercel I'm not seeing this issue. |
Same Problem here. Updated an existing Project from SvelteKit v1.0.0-next.131 to 137 und svelte version to 3.40.2. Can confirm that with svelte 3.40.1 the problem does not exist. node: v14.17.2 |
So coming back around to this. Ive tried all the above solutions:
FWIW ive delete None of the above worked. EDIT: I didnt explicitly do EDIT 2: I still needed the |
I am seeing this issue with: Worked around it with
|
Same problem when i create a new skeleton project Node v14.17.3 What works for me
|
@kampsy you don't need to create the |
This wasnt true for me. I had to create the |
Hi, I've had no success with the same setup as @kampsy. I added the |
@joeczar remove "^" from "svelte": "^3.40.1" then run npm install |
Thanks @kampsy! It's running now. |
Still having this problem despite comments immediately above. Didn't take the time to read all the comments above, but all I can say is just ensure that each .svelte template includes a script tag with at least one valid line of JavaScript. I'm using svelte 3.40.2 and @sveltejs/kit 1.0.0-next.137. Such as: <script>
console.log('test')
</script> |
Downgrading to In my case, it was |
Just found this PR on vite: vitejs/vite#2904 that looks like it fixes this (and may log a warning for the invalid sourcemap source) |
From my local tests with the latest HEAD of Vite, it looks like this issue is already resolved, and so hopefully that PR will be included in tomorrow's Vite release. I am also getting the warnings about @dominikg I'm still not entirely sure what sveltejs/svelte#6089 was initially intended to do. Does this warning we'd now be getting from Vite indicate that there is in fact something wrong with our sourcemaps, but it's just that Vite will be able to cope better with that? |
@dummdidumm would know better but it seems like that PR adds a missing source entry to the first map when combining sourcemaps to avoid a potential upstream issue in remapping. The added source entry caused vite to attempt to read the source but the constructed path to that is wrong (see duplicate We still need to figure out why that path is wrong, but the warnings from vite might help with that. TL;DR For those affected by this issue: |
This is still happening with 3.40.3 (as expected per dominikg's comment I guess). |
vite 2.4.4 has been released and the skeleton project works again. Instead of an error, vite just prints a warning now. dominikg@mb14:~/develop/reproductions/kit-vite-244$ pnpm ls vite --depth=Infinity
Legend: production dependency, optional only, dev only
~[email protected] /home/dominikg/develop/reproductions/kit-vite-244
devDependencies:
@sveltejs/kit 1.0.0-next.137
├─┬ @sveltejs/vite-plugin-svelte 1.0.0-next.14
│ └── vite 2.4.4 peer
└── vite 2.4.4
dominikg@mb14:~/develop/reproductions/kit-vite-244$ pnpm dev
> ~[email protected] dev /home/dominikg/develop/reproductions/kit-vite-244
> svelte-kit dev
SvelteKit v1.0.0-next.137
local: http://localhost:3000
network: not exposed
Use --host to expose server to other devices on this network
Sourcemap for "/home/dominikg/develop/reproductions/kit-vite-244/.svelte-kit/dev/components/layout.svelte" points to missing source files
Sourcemap for "/home/dominikg/develop/reproductions/kit-vite-244/src/routes/index.svelte" points to missing source files
|
I think the point is |
I'm not sure why is it closed. What is the solution? |
@eden-lane try to uninstall and reinstall |
Describe the bug
After creating a new project and attempting to start it up with
npm run dev
, I get the followingNote the duplicate portion of the path
.svelte-kit/dev/components
SvelteKit v1.0.0-next.137
Reproduction
https://github.com/chrisolsen/bug-sveltekit
➜ Projects npm init svelte@next community-sveltekit
npx: installed 5 in 1.004s
create-svelte version 2.0.0-next.76
Welcome to SvelteKit!
This is beta software; expect bugs and missing features.
If you encounter a problem, open an issue on https://github.com/sveltejs/kit/issues if none exists already.
✔ Which Svelte app template? › Skeleton project
✔ Use TypeScript? … No / Yes
✔ Add ESLint for code linting? … No / Yes
✔ Add Prettier for code formatting? … No / Yes
✔ Copied project files
✔ Added TypeScript support. To use it inside Svelte components, add lang="ts" to the attributes of a script tag.
✔ Added ESLint.
Readme for ESLint and Svelte: https://github.com/sveltejs/eslint-plugin-svelte3
✔ Added Prettier.
General formatting options: https://prettier.io/docs/en/options.html
Svelte-specific formatting options: https://github.com/sveltejs/prettier-plugin-svelte#options
Want to add other parts to your code base? Visit https://github.com/svelte-add/svelte-adders, a community project of commands to add particular functionality to Svelte projects
Next steps:
1: cd community-sveltekit
2: npm install (or pnpm install, etc)
3: git init && git add -A && git commit -m "Initial commit" (optional step)
4: npm run dev -- --open
============
➜ community-sveltekit git:(master) npm run dev
SvelteKit v1.0.0-next.137
local: http://localhost:3000
network: not exposed
Use --host to expose server to other devices on this network
ENOENT: no such file or directory, open '/home/chris/Projects/community-sveltekit/.svelte-kit/dev/components/.svelte-kit/dev/components/layout.svelte'
Error: ENOENT: no such file or directory, open '/home/chris/Projects/community-sveltekit/.svelte-kit/dev/components/.svelte-kit/dev/components/layout.svelte'
ENOENT: no such file or directory, open '/home/chris/Projects/community-sveltekit/.svelte-kit/dev/components/.svelte-kit/dev/components/layout.svelte'
Error: ENOENT: no such file or directory, open '/home/chris/Projects/community-sveltekit/.svelte-kit/dev/components/.svelte-kit/dev/components/layout.svelte'
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: