Skip to content
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 template not creating project #44

Open
schlumpfling42 opened this issue Nov 17, 2024 · 6 comments
Open

Sveltekit template not creating project #44

schlumpfling42 opened this issue Nov 17, 2024 · 6 comments

Comments

@schlumpfling42
Copy link

I tried to create a project with the sveltekit template and when I start up the project, the setup doesn't finish and it generates this error.log:
`these 5 derivations will be built:
/nix/store/53xmly4lpzsyrcyr1n71xv5saqipyzng-idx-template.drv
/nix/store/r1g97pfblqkssrarpkj6dcwmj6sv8ig5-sandbox-files.drv
/nix/store/zq25wlcgdzbzaiwc4r6rfwxnn667jj78-sandbox.drv
/nix/store/l7dyzrhdm3qf0r3yaqaidb1nfhpj4jal-usr-env.drv
/nix/store/f16pw47afh9d59jgllsg910fmjxjlq6q-idx-template.drv
these 2 paths will be fetched (1.11 MiB download, 6.17 MiB unpacked):
/nix/store/1jnl0g7a6fcc7ma4f4kg77arpz84ifzf-ShellCheck-0.9.0
/nix/store/wam6939g2ch4aj6g30nfcsfm9lchmmjy-bash-5.2-p15-man
copying path '/nix/store/1jnl0g7a6fcc7ma4f4kg77arpz84ifzf-ShellCheck-0.9.0' from 'https://cache.nixos.org' to 'local-overlay://'...
copying path '/nix/store/wam6939g2ch4aj6g30nfcsfm9lchmmjy-bash-5.2-p15-man' from 'https://cache.nixos.org' to 'local-overlay://'...
building '/nix/store/53xmly4lpzsyrcyr1n71xv5saqipyzng-idx-template.drv'...
building '/nix/store/r1g97pfblqkssrarpkj6dcwmj6sv8ig5-sandbox-files.drv'...
building '/nix/store/zq25wlcgdzbzaiwc4r6rfwxnn667jj78-sandbox.drv'...
created 331 symlinks in user environment
building '/nix/store/l7dyzrhdm3qf0r3yaqaidb1nfhpj4jal-usr-env.drv'...
/nix/store/8gb0v1n1l7376wq6w3v1gpn5l0yy7v93-usr-env /build
/nix/store/8gb0v1n1l7376wq6w3v1gpn5l0yy7v93-usr-env/usr /nix/store/8gb0v1n1l7376wq6w3v1gpn5l0yy7v93-usr-env /build
/nix/store/8gb0v1n1l7376wq6w3v1gpn5l0yy7v93-usr-env /build
building '/nix/store/f16pw47afh9d59jgllsg910fmjxjlq6q-idx-template.drv'...
npm WARN deprecated [email protected]: create-svelte has been deprecated - please begin using https://www.npmjs.com/package/sv instead

added 1 package, and audited 2 packages in 1s

found 0 vulnerabilities
node:internal/modules/esm/resolve:214
const resolvedOption = FSLegacyMainResolve(packageJsonUrlString, packageConfig.main, baseStringified);
^

Error: Cannot find package '/build/node_modules/create-svelte/package.json' imported from /build/init.js
at legacyMainResolve (node:internal/modules/esm/resolve:214:26)
at packageResolve (node:internal/modules/esm/resolve:840:14)
at moduleResolve (node:internal/modules/esm/resolve:910:20)
at defaultResolve (node:internal/modules/esm/resolve:1130:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap. (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.11.1
`

@rodydavis
Copy link
Collaborator

Looking into it! Thank you for the issue

@rodydavis
Copy link
Collaborator

Both the TS and JS versions launched and created for me. Can you try again?

Screenshot 2024-11-18 at 11 01 25 AM
Screenshot 2024-11-18 at 11 00 25 AM

If you ever get an error like that you can run the onCreate command in the workspace:
Screenshot 2024-11-18 at 11 02 33 AM

Sometimes for various reasons it can fail but this way you can recreate the dependencies.

@schlumpfling42
Copy link
Author

@rodydavis How did you create this? It doesn't look like SvelteKit.
SvelteKit is not officially supported on the IDX site where you create a project.
But I found the sveltekit folder in this project and according to https://developers.google.com/idx/guides/custom-templates I should be able to use it to create a project with this url:
https://idx.google.com/new?template=https://github.com/project-idx/templates/tree/main/sveltekit
But it fails with the above error.

@rodydavis rodydavis transferred this issue from project-idx/templates Nov 18, 2024
@rodydavis rodydavis reopened this Nov 18, 2024
@rodydavis rodydavis transferred this issue from project-idx/community-templates Nov 18, 2024
@rodydavis
Copy link
Collaborator

Looks like the old version of the svelte kit cli does not work and sv (the new command) needs to get reworked.

I will see if I can get it updated.

@rodydavis
Copy link
Collaborator

Looks like the createProject is no longer public:
https://github.com/sveltejs/cli/blob/main/packages/cli/commands/create.ts#L94

Will try to make a PR.

@rodydavis
Copy link
Collaborator

This is currently blocked and not possible to create until we can call the function directly in the svelte API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants