sveltekit-starter
sveltekit-starter copied to clipboard
Doesn't work
Describe the bug
Lots of errors and depreciated things
To Reproduce
- Clone using
npx degit navneetsharmaui/sveltekit-starter --force
-
pnpm install
-
pnpm dev
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop
Please complete the following information
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone
Please complete the following information
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Error log:
gitpod /workspace/ideashare (main) $ pnpm install
WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
Packages: +519
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are cloned from the content-addressable store to the virtual store.
Content-addressable store is at: /workspace/.pnpm-store/v3
Virtual store is at: node_modules/.pnpm
Progress: resolved 561, reused 221, downloaded 297, added 519, done
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 809ms
node_modules/.pnpm/[email protected]_nyu6umbehu4wjk4fztvoy55uia/node_modules/svelte-preprocess: Running postinstall script, done in 30ms
> [email protected] prepare /workspace/ideashare
> husky install
husky - Git hooks installed
devDependencies:
+ @sveltejs/adapter-vercel 1.0.0-next.26 (1.0.0-next.65 is available)
+ @sveltejs/kit 1.0.0-next.142 (1.0.0-next.392 is available)
+ @tailwindcss/typography 0.4.1 (0.5.4 is available)
+ @types/node 16.11.45 (18.0.6 is available)
+ @types/node-fetch 2.6.2
+ @types/nprogress 0.2.0
+ @typescript-eslint/eslint-plugin 5.30.7
+ @typescript-eslint/parser 5.30.7
+ autoprefixer 10.4.7
+ cross-env 7.0.3
+ cssnano 5.1.12
+ cssnano-preset-advanced 5.3.8
+ dotenv 10.0.0 (16.0.1 is available)
+ eslint 7.32.0 (8.20.0 is available)
+ eslint-config-airbnb-typescript 16.2.0 (17.0.0 is available)
+ eslint-config-prettier 8.5.0
+ eslint-import-resolver-typescript 2.7.1 (3.3.0 is available)
+ eslint-plugin-eslint-comments 3.2.0
+ eslint-plugin-import 2.26.0
+ eslint-plugin-promise 6.0.0
+ eslint-plugin-svelte3 3.4.1 (4.0.0 is available)
+ eslint-plugin-tsdoc 0.2.16
+ husky 7.0.4 (8.0.1 is available)
+ lint-staged 11.2.6 (13.0.3 is available)
+ node-fetch 2.6.7 (3.2.9 is available)
+ npm-run-all 4.1.5
+ nprogress 0.2.0
+ postcss 8.4.14
+ postcss-cli 8.3.1 (10.0.0 is available)
+ postcss-load-config 3.1.4 (4.0.1 is available)
+ prettier 2.2.1 (2.7.1 is available)
+ prettier-plugin-svelte 2.7.0
+ rimraf 3.0.2
+ svelte 3.49.0
+ svelte-check 2.8.0
+ svelte-loader 3.1.3
+ svelte-preprocess 4.10.7
+ tailwindcss 2.2.19 (3.1.6 is available)
+ ts-node 10.9.1
+ tslib 2.4.0
+ typescript 4.7.4
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
.
└─┬ @sveltejs/kit
└─┬ @sveltejs/vite-plugin-svelte
└── ✕ unmet peer vite@^3.0.0: found 2.9.14 in @sveltejs/kit
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.
gitpod /workspace/ideashare (main) $ pnpm dev
> [email protected] dev /workspace/ideashare
> npm run check-env && npm run dev:sveltekit
> [email protected] check-env
> node --loader ts-node/esm scripts/js/check-env.ts
(node:6157) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
> [email protected] dev:sveltekit
> svelte-kit dev
SvelteKit v1.0.0-next.142
local: http://localhost:3000
network: not exposed
Use --host to expose server to other devices on this network
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
1:47:52 PM [vite-plugin-svelte] /workspace/ideashare/src/lib/shared/ui/components/navigation-progress-bar/NavigationProgressBar.svelte:79:1 No scopable elements found in template. If you're using global styles in the style tag, you should move it into an external stylesheet file and import it in JS. See https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#where-should-i-put-my-global-styles.
Function called outside component initialization
Error: Function called outside component initialization
at get_current_component (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:953:15)
at Module.setContext (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:985:5)
at root.svelte:17:1
at $$render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1770:22)
at Object.render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1778:26)
at render_response (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:472:28)
at async respond$1 (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1309:10)
at async render_page (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1353:19)
at async resolve (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1613:10)
at async respond (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1588:10)
Function called outside component initialization
Error: Function called outside component initialization
at get_current_component (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:953:15)
at Module.setContext (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:985:5)
at root.svelte:17:1
at $$render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1770:22)
at Object.render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1778:26)
at render_response (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:472:28)
at async respond_with_error (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1087:10)
at async respond$1 (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1323:10)
at async render_page (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1353:19)
at async resolve (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1613:10)
Function called outside component initialization
Error: Function called outside component initialization
at get_current_component (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:953:15)
at Module.setContext (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:985:5)
at root.svelte:17:1
at $$render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1770:22)
at Object.render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1778:26)
at render_response (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:472:28)
at async respond$1 (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1309:10)
at async render_page (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1353:19)
at async resolve (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1613:10)
at async respond (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1588:10)
Function called outside component initialization
Error: Function called outside component initialization
at get_current_component (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:953:15)
at Module.setContext (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs:985:5)
at root.svelte:17:1
at $$render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1770:22)
at Object.render (/node_modules/.pnpm/[email protected]/node_modules/svelte/internal/index.mjs?v=383e787c:1778:26)
at render_response (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:472:28)
at async respond_with_error (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1087:10)
at async respond$1 (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1323:10)
at async render_page (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1353:19)
at async resolve (file:///workspace/ideashare/node_modules/.pnpm/@[email protected][email protected]/node_modules/@sveltejs/kit/dist/ssr.js:1613:10)
Thanks for creating the issue. Attach the details about the issue.
It worked for me
I used node v16 and npm install
rather than yarn
@Explosion-Scratch I had the same problem. If you disable ssr in svelte.config.js it works. This seems to be a problem, that was resolved in a newer sveltekit version. I updated the template to that version and look forward to making a PR.
The issue had been stale for a long time. Closing the issue for now. You can reopen the issue.