You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> xviewer-react-template@1.0.0 start
> vite --host
▲ [WARNING] The CommonJS "exports" variable is treated as a global variable in an ECMAScript module and may not work as expected [commonjs-variable-in-esm]
vite.config.js:6:0:
6 │ exports.default = (0, vite_1.defineConfig)({
╵ ~~~~~~~
This file is considered to be an ECMAScript module because the enclosing "package.json" file sets
the type of this file to "module":
package.json:5:10:
5 │ "type": "module",
╵ ~~~~~~~~
Node's package format requires that CommonJS files in a "type": "module" package use the ".cjs"
file extension.
failed to load config from C:\Users\nkliu\Desktop\www-genshin\vite.config.js
error when starting dev server:
ReferenceError: exports is not defined in ES module scope
at file:///C:/Users/nkliu/Desktop/www-genshin/vite.config.js.timestamp-1702126836837-56264ac4324cb.mjs:10:23
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadConfigFromBundledFile (file:///C:/Users/nkliu/Desktop/www-genshin/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66329:21)
at async loadConfigFromFile (file:///C:/Users/nkliu/Desktop/www-genshin/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66178:28)
at async resolveConfig (file:///C:/Users/nkliu/Desktop/www-genshin/node_modules/vite/dist/node/chunks/dep-68d1a114.js:65774:28)
at async _createServer (file:///C:/Users/nkliu/Desktop/www-genshin/node_modules/vite/dist/node/chunks/dep-68d1a114.js:65051:20)
at async CAC.<anonymous> (file:///C:/Users/nkliu/Desktop/www-genshin/node_modules/vite/dist/node/cli.js:763:24)
我试图解决但似乎没有变化,希望帮我解决。
The text was updated successfully, but these errors were encountered:
我npm i后使用npm start时发生错误:
我试图解决但似乎没有变化,希望帮我解决。
The text was updated successfully, but these errors were encountered: