Kevin Powell - CommunityKP-C
Kevin Powell - Communityโ€ข2y agoโ€ข
71 replies
JOY

ReferenceError: Request is not defined -while setting up sveltekit project

ReferenceError: Request is not defined
    at getRequest (file:///C:/Users/welcome/Desktop/Ed/sveltkit-test/node_modules/@sveltejs/kit/src/exports/node/index.js:107:2)
    at file:///C:/Users/welcome/Desktop/Ed/sveltkit-test/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:497:27
    at processTicksAndRejections (node:internal/process/task_queues:96:5)


I just setup a fresh sveltekit project, when I opened the localhost it shows me the error above in the browser.
No error in terminal console.

node version using - v20.12.1

And also while creating a Vue project I get this error.

command: npm create vue@latest
ouptut:
TypeError: (0 , import_node_util.parseArgs) is not a function
    at init (C:\Users\welcome\AppData\Local\npm-cache\_npx\2f7e7bff16d1c534\node_modules\create-vue\outfile.cjs:4481:72)
    at Object.<anonymous> (C:\Users\welcome\AppData\Local\npm-cache\_npx\2f7e7bff16d1c534\node_modules\create-vue\outfile.cjs:4862:1)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47


Are these errors interlinked somehow? How to solve it?
Was this page helpful?