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
See original GitHub issueDescribe 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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: exports is not defined in filed ...
I'm trying to get started with Typescript for Electron development. After wrestling with getting typing for node and jQuery ...
Read more >pages/index.json at trunk - Codeberg
We looked everywhere, but we couldn't find an OSI- or FSF-approved Free Software or Content License, which is a requirement for hosting content...
Read more >Sass now has the "evaluating SSR module" Error in dev mode
Describe the bug The newest Version of kit and vite throw this error when starting the dev server but after a refresh everthing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
: