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

dev dependancies vs dependancies #10079

Closed
marksteven opened this issue Jun 1, 2023 · 2 comments
Closed

dev dependancies vs dependancies #10079

marksteven opened this issue Jun 1, 2023 · 2 comments

Comments

@marksteven
Copy link

marksteven commented Jun 1, 2023

Describe the bug

Error report -
"You are using SvelteKit-specific imports in your code, but you have not declared a dependency on @sveltejs/kit in your package.json

This was a test with new install to try to get all the dependancies and dev dependancies working correctly specifically with Tailwind Typescript on Sveltekit
npm create svelte@latest my-test-all-in-one
Library Typescript prettier lint
cd my-test-all-in-one
npm install
npx svelte-add@latest tailwindcss

Static Site
npm i -D @sveltejs/adapter-static
add to +layout.js export const prerender = true;

npm run build builds but throws error - (above)

Searching docs I cannot find the correct setups to which packages should be
devDependencies and which should load as Dependencies

Does anyone have any pointers on this?
Its not breaking but I would like to correct if possible.

Seems there is another mention on a closed post
Re closed #7685

Reproduction

"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.5.0",
"@sveltejs/package": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.26.0",
"postcss": "^8.4.23",
"postcss-load-config": "^4.0.1",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"publint": "^0.1.9",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"svelte-preprocess": "^5.0.3",
"tailwindcss": "^3.3.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.3.0"
},
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"dependencies": {
"svelte-video-player": "^1.2.5",
"vidstack": "^0.5.6"
}
}

Logs

No response

System Info

System

Severity

annoyance

Additional Information

No response

@marksteven marksteven closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2023
@marksteven marksteven reopened this Jun 1, 2023
@Conduitry
Copy link
Member

If you're just trying to create a static site, you probably shouldn't be using the Library template. With the Library template, npm run build also invokes https://kit.svelte.dev/docs/packaging - That warning is coming from there.

@Conduitry Conduitry closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2023
@marksteven
Copy link
Author

marksteven commented Jun 2, 2023

OK thankyou for your comments.
Reason I use library instead of skeleton is the build from skeleton goes into (dot) ".svelt-kit" folder
where library builds in "dist" folder
Only work around is to add static adapter and configure output that way but negates using SSR in alot of cases.
Unless I am wrong and happy to be corrected

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