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

Error while creating 'Library skeleton project' #7475

Closed
stuymedova opened this issue Nov 2, 2022 · 2 comments · Fixed by #8484
Closed

Error while creating 'Library skeleton project' #7475

stuymedova opened this issue Nov 2, 2022 · 2 comments · Fixed by #8484
Labels
error handling feature / enhancement New feature or request pkg:svelte-package Issues related to svelte-package
Milestone

Comments

@stuymedova
Copy link

Describe the bug

I have just started a new project using the npm create svelte@latest command. After which I chose the following options:

✔ Where should we create your project?
  (leave blank to use current directory) … 
✔ Which Svelte app template? › Library skeleton project
✔ Add type checking with TypeScript? › No
✔ Add ESLint for code linting? … No / Yes
✔ Add Prettier for code formatting? … No / Yes
✔ Add Playwright for browser testing? … No / Yes

Then run npm install and upon completion npm run build. I received the following error:

> Failed to locate tsconfig or jsconfig
    at loadTsconfig (/Users/stuymedova/Documents/github/projects/web-development/_test2/node_modules/svelte2tsx/index.js:7260:15)
    at emitDts (/Users/stuymedova/Documents/github/projects/web-development/_test2/node_modules/svelte2tsx/index.js:7250:36)
    at async emit_dts (file:///Users/stuymedova/Documents/github/projects/web-development/_test2/node_modules/@sveltejs/package/src/typescript.js:23:2)
    at async Module.build (file:///Users/stuymedova/Documents/github/projects/web-development/_test2/node_modules/@sveltejs/package/src/index.js:30:3)
    at async file:///Users/stuymedova/Documents/github/projects/web-development/_test2/node_modules/@sveltejs/package/src/cli.js:27:4

Reproduction

I suppose that instructions above would be sufficient because I've started from scratch.

Logs

No response

System Info

System:
    OS: macOS 13.0
    CPU: (4) x64 Intel(R) Core(TM) i3-1000NG4 CPU @ 1.10GHz
    Memory: 28.30 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 107.0.5304.87
    Firefox: 98.0
    Safari: 16.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.86 
    @sveltejs/kit: next => 1.0.0-next.532 
    @sveltejs/package: next => 1.0.0-next.1 
    svelte: ^3.44.0 => 3.52.0 
    vite: ^3.1.0 => 3.2.2

Severity

blocking an upgrade

Additional Information

No response

@dummdidumm
Copy link
Member

A jsconfig or tsconfig is required for @sveltejs/package unless you turn off the emit types option, and since you added "no", it throws an error because no such config could be found while trying to generate type definitions from your Svelte file.
This works as designed, but the error could be better in explaining why you need one.

@dummdidumm dummdidumm added feature / enhancement New feature or request pkg:svelte-package Issues related to svelte-package error handling labels Nov 2, 2022
@dummdidumm dummdidumm added this to the whenever milestone Nov 2, 2022
@stuymedova
Copy link
Author

Thank you for a quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling feature / enhancement New feature or request pkg:svelte-package Issues related to svelte-package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants