You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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
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 yourpackage.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
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: