leomofthings
leomofthings

Reputation: 1

Encountering error while running `npm run dev` for Svelte Routify Template

After cloning this template on my local computer, I perform the npm install but I encounter error while using npm run dev below is the error it is returning

vite

failed to load config from C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master\vite.config.js
error when starting dev server:
Error: Cannot find module 'node:path'
Require stack:

C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master\node_modules\vite\dist\node-cjs\publicUtils.cjs
C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master\node_modules\vite\index.cjs
C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master\vite.config.js
C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master\node_modules\vite\dist\node\chunks\dep-665b0112.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object. (C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master\node_modules\vite\dist\node-cjs\publicUtils.cjs:5:14)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Object._require.extensions. [as .js] (file:///C:/Users/WIN%20PRO%2011/Downloads/routify-starter-master/routify-starter-master/node_modules/vite/dist/node/chunks/dep-665b0112.js:63441:17)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
npm ERR! code ELIFECYCLE
npm ERR![Routify] Watching src/pages
errno 1
npm ERR! routify-starter@ dev:vite: vite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the routify-starter@ dev:vite script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! routify-starter@ dev: run-p dev:*
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the routify-starter@ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\WIN PRO 11\AppData\Roaming\npm-cache_logs\2022-10-28T04_58_00_473Z-debug.log
PS C:\Users\WIN PRO 11\Downloads\routify-starter-master\routify-starter-master>

After running npx @roxi/routify init and doing npm install, and running npm run dev. I was expecting the server to open up and I should be able to view my application.

Upvotes: 0

Views: 216

Answers (1)

leomofthings
leomofthings

Reputation: 1

Uninstall your current version of node, install the latest the latest version, or update your node installation.

Perform the operation from scratch. You are good to go.

Upvotes: 0

Related Questions