0
  • I ran the following commands in sveltekit to create a new project

    npx sv create ch_ui
    
  • I selected the following options

    ┌  Welcome to the Svelte CLI! (v0.8.20)
    │
    ◇  Which template would you like?
    │  SvelteKit minimal
    │
    ◇  Add type checking with TypeScript?
    │  Yes, using TypeScript syntax
    │
    ◆  Project created
    │
    ◇  What would you like to add to your project? (use arrow keys / space bar)
    │  prettier, eslint, vitest, playwright, sveltekit-adapter, devtools-json
    │
    ◇  vitest: What do you want to use vitest for?
    │  unit testing, component testing
    │
    ◇  sveltekit-adapter: Which SvelteKit adapter would you like to use?
    │  node
    │
    ◆  Successfully setup add-ons
    │
    ◇  Which package manager do you want to install dependencies with?
    │  npm
    │
    ◆  Successfully installed dependencies
    │
    ◇  Successfully formatted modified files
    │
    
    
  • I navigated inside the directory and ran the following command

    npm run lint && npm run format && npm run check && npm run test && npm run dev
    
  • It immediately throws the following error.

     RUN  v3.2.4 /Users/vr/Desktop/code/ch/ch_ui
    
    The following Vite config options will be overridden by SvelteKit:
      - base
     ✓  server  src/demo.spec.ts (1 test) 15ms
    1:40:41 PM [vite] (ssr) Error when evaluating SSR module /node_modules/@sveltejs/kit/src/runtime/server/index.js: Cannot read properties of undefined (reading 'wrapDynamicImport')
          at /Users/vr/Desktop/code/ch/ch_ui/node_modules/@sveltejs/kit/src/runtime/app/server/event.js:9:1
          at ESModulesEvaluator.runInlinedModule (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/module-runner.js:909:9)
          at SSRCompatModuleRunner.directRequest (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/module-runner.js:1067:80)
          at SSRCompatModuleRunner.directRequest (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/chunks/dep-BHkUv4Z8.js:18888:34)
          at SSRCompatModuleRunner.cachedRequest (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/module-runner.js:973:23)
          at request (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/module-runner.js:1014:76)
          at async eval (/Users/vr/Desktop/code/ch/ch_ui/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js:4:1)
          at async ESModulesEvaluator.runInlinedModule (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/module-runner.js:909:3)
          at async SSRCompatModuleRunner.directRequest (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/module-runner.js:1067:59)
          at async SSRCompatModuleRunner.directRequest (file:///Users/vr/Desktop/code/ch/ch_ui/node_modules/vite/dist/node/chunks/dep-BHkUv4Z8.js:18888:22)
     ✓  client (chromium)  src/routes/page.svelte.test.ts (1 test) 5ms
     Test Files  2 passed (2)
          Tests  2 passed (2)
       Start at  13:40:39
       Duration  2.20s (transform 49ms, setup 4ms, collect 162ms, tests 20ms, environment 0ms, prepare 2.47s)
    

The tests are passing but what is this error and how do you fix this?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.