kit: Repeated errors from [vite] after `pnpm init svelte@next my-app` (2.0.0-next.55): Error when evaluating SSR module `cookie`: ReferenceError: exports is not defined
Describe the bug
Repeated errors from [vite] after fresh install pnpm init svelte@next my-app
create-svelte
package version: 2.0.0-next.55
Error when evaluating SSR module /node_modules/.pnpm/cookie@0.4.1/node_modules/cookie/index.js:
ReferenceError: exports is not defined
Logs
11:41:24 PM [vite] Error when evaluating SSR module /node_modules/.pnpm/cookie@0.4.1/node_modules/cookie/index.js:
ReferenceError: exports is not defined
at /node_modules/.pnpm/cookie@0.4.1/node_modules/cookie/index.js:15:1
at instantiateModule (/home/alex/my-app/node_modules/.pnpm/vite@2.1.5/node_modules/vite/dist/node/chunks/dep-66eb515d.js:69030:166)
11:41:24 PM [vite] new dependencies found: cookie, @lukeed/uuid, updating...
11:41:24 PM [vite] ✨ dependencies updated, reloading page...
11:41:26 PM [vite] Error when evaluating SSR module /node_modules/.pnpm/cookie@0.4.1/node_modules/cookie/index.js:
ReferenceError: exports is not defined
at /node_modules/.pnpm/cookie@0.4.1/node_modules/cookie/index.js:15:1
at instantiateModule (/home/alex/my-app/node_modules/.pnpm/vite@2.1.5/node_modules/vite/dist/node/chunks/dep-66eb515d.js:69030:166) (x137)
To Reproduce
pnpm init svelte@next my-app
✔ Which Svelte app template? › SvelteKit demo app
✔ Use TypeScript? … yes
✔ Add ESLint for code linting? … yes
✔ Add Prettier for code formatting? … yes
cd my-app
pnpm install
npm run dev -- --open
Expected behavior No repeated warnings in console ouput 😃
Information about your SvelteKit Installation:
Diagnostics
- The output of
npx envinfo --system --npmPackages svelte,@sveltejs/kit,vite --binaries --browsers
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
CPU: (2) x64 Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)
Memory: 93.37 MB / 984.89 MB
Container: Yes
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 14.16.1 - /usr/local/bin/node
Yarn: 2.0.0-rc.27 - ~/.npm-global/bin/yarn
npm: 6.13.7 - ~/.npm-global/bin/npm
npmPackages:
@sveltejs/kit: next => 1.0.0-next.80
svelte: ^3.29.0 => 3.37.0
vite: ^2.1.0 => 2.1.5
-
Your browser Chrome 88.0.4324.150 64bit
-
Your adapter (e.g. Node, static, Vercel, Begin, etc…)
Severity How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of SvelteKit entirely?
This is an annoying bug, i can not use SvelteKit normally, because of it.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (10 by maintainers)
Think this is blocking the demo app from functioning correctly. The TODOs don’t seem to enter correctly nor does the state save between tabs.
I think this was fixed by https://github.com/sveltejs/kit/pull/1148 which removes the code below from the template’s
svelte.config.cjs
:@alukach oof. yeah, I accidentally pushed the wrong change. the CI was failing too. Should be fixed now!