Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start Vite dev server #28

Open
NexZhu opened this issue Nov 4, 2022 · 2 comments
Open

Failed to start Vite dev server #28

NexZhu opened this issue Nov 4, 2022 · 2 comments

Comments

@NexZhu
Copy link

NexZhu commented Nov 4, 2022

Error log:

failed to load config from /root/dev/web/daotl-vitesse/vite.config.ts
error when starting dev server:
file:///root/dev/web/daotl-vitesse/node_modules/.pnpm/[email protected][email protected]/node_modules/vite-plugin-vue-inspector/dist/index.mjs:32
import { parse as babelParse, traverse as babelTraverse } from "@babel/core";
                              ^^^^^^^^
SyntaxError: Named export 'traverse' not found. The requested module '@babel/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@babel/core';
const { parse: babelParse, traverse: babelTraverse } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:527:24)
    at async loadConfigFromBundledFile (file:///root/dev/web/daotl-vitesse/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-c842e491.js:64010:21)
    at async loadConfigFromFile (file:///root/dev/web/daotl-vitesse/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-c842e491.js:63895:28)
    at async resolveConfig (file:///root/dev/web/daotl-vitesse/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-c842e491.js:63519:28)
    at async createServer (file:///root/dev/web/daotl-vitesse/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-c842e491.js:62819:20)
    at async CAC.<anonymous> (file:///root/dev/web/daotl-vitesse/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/cli.js:707:24)
 ELIFECYCLE  Command failed with exit code 1.
@webfansplz
Copy link
Owner

Can you provide a mini repo?

@NexZhu
Copy link
Author

NexZhu commented Nov 10, 2022

@webfansplz Uncomment // Inspector() in https://github.com/daotl/vitesse/blob/main/vite.config.ts and you can reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants