首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为Svelte模板运行‘`npm运行dev’时遇到错误

为Svelte模板运行‘`npm运行dev’时遇到错误
EN

Stack Overflow用户
提问于 2022-10-28 12:48:09
回答 1查看 16关注 0票数 0

在本地计算机上克隆此模板后,我执行npm安装,但在使用npm时遇到错误,下面是它正在返回的错误。

vite

代码语言:javascript
复制
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>

在运行npx @roxi/routify init并执行npm install和运行npm run dev之后。我原以为服务器会打开,我应该能够查看我的应用程序。

EN

回答 1

Stack Overflow用户

发布于 2022-10-29 22:49:40

卸载当前版本的节点,安装最新版本,或更新节点安装。

从头开始执行操作。你可以走了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74235659

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档