failed to load config from /Users/zhanghaoran/learn/vue3/vue-project/vite.config.js
error when starting dev server:
Error: Cannot find module 'node:url’
Require stack:
- /Users/zhanghaoran/learn/vue3/vue-project/vite.config.js
- /Users/zhanghaoran/learn/vue3/vue-project/node_modules/vite/dist/node/chunks/dep-abb4f102.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/zhanghaoran/learn/vue3/vue-project/vite.config.js:35:23)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object._require.extensions. [as .js] (file:///Users/zhanghaoran/learn/vue3/vue-project/node_modules/vite/dist/node/chunks/dep-abb4f102.js:66146:24)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-project@0.0.0 dev: vite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-project@0.0.0 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! /Users/zhanghaoran/.npm/_logs/2023-07-19T13_12_21_548Z-debug.log