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

Cli package option creates skeleton library project with missing configuration file #9711

Closed
antony opened this issue Apr 19, 2023 · 0 comments · Fixed by #9712
Closed

Cli package option creates skeleton library project with missing configuration file #9711

antony opened this issue Apr 19, 2023 · 0 comments · Fixed by #9712
Labels
bug Something isn't working

Comments

@antony
Copy link
Member

antony commented Apr 19, 2023

Describe the bug

It looks like if you elect to use neither JS with types or Typescript when creating a package from the CLI, you end up without a jsconfig or tsconfig file.

However, packaging defaults types to true, because it's recommended for the ecosystem, so this file is mandatory.

Reproduction

npm create svelte@latest # select plain JS library project
pnpm i
pnpm build

> Failed to locate tsconfig or jsconfig

Logs

> [email protected] package
> svelte-kit sync && svelte-package && publint

> Failed to locate tsconfig or jsconfig
    at loadTsconfig (/home/ant/Projects/some-comp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/svelte2tsx/index.js:6181:15)
    at emitDts (/home/ant/Projects/some-comp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/svelte2tsx/index.js:6170:36)
    at async emit_dts (file:///home/ant/Projects/some-comp/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/package/src/typescript.js:25:2)
    at async do_build (file:///home/ant/Projects/some-comp/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/package/src/index.js:37:3)
    at async Module.build (file:///home/ant/Projects/some-comp/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/package/src/index.js:16:2)
    at async file:///home/ant/Projects/some-comp/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sveltejs/package/src/cli.js:47:4
 ELIFECYCLE  Command failed with exit code 1.

System Info

❯ npx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite}"

  System:
    OS: Linux 6.0 Pop!_OS 22.04 LTS
    CPU: (8) x64 AMD Ryzen 7 4700U with Radeon Graphics
    Memory: 15.64 GB / 30.78 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 19.8.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.5.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 108.0.2
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.0.0 
    @sveltejs/kit: ^1.5.0 => 1.5.0 
    @sveltejs/package: ^2.0.0 => 2.0.0 
    svelte: ^3.54.0 => 3.54.0 
    vite: ^4.2.0 => 4.2.0

Severity

annoyance

Additional Information

No response

@dummdidumm dummdidumm added the bug Something isn't working label Apr 19, 2023
dummdidumm added a commit that referenced this issue Apr 19, 2023
fixes #9711 - there was a typo in the shared template files
also turn on strict mode while we're at it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants