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

error when starting dev server: Cannot read property 'startsWith' of undefined #6018

Closed
7 tasks done
Lupeiwen0 opened this issue Dec 9, 2021 · 2 comments
Closed
7 tasks done
Labels
needs reproduction regression The issue only appears after a new release

Comments

@Lupeiwen0
Copy link

Describe the bug

This error in resolveBuildOptions
const resolve = (p) => p.startsWith('\0') ? p : path__default.resolve(root, p);

Because I have dynamically configured the packaged output file, but this error will be reported when outdir is not configured because the configuration file name is not required in the development environment

Reproduction

Although this may not be a bug, I think it can be optimized because it is not very troublesome

System Info

vite 2.7.1
macOs
chrome lasted

Used Package Manager

yarn

Logs

error when starting dev server:
TypeError: Cannot read property 'startsWith' of undefined
    at resolve (/Users/lupeiwen/Documents/element-compoistion-admin-vite/node_modules/vite/dist/node/chunks/dep-3daf770c.js:43361:30)
    at resolveBuildOptions (/Users/lupeiwen/Documents/element-compoistion-admin-vite/node_modules/vite/dist/node/chunks/dep-3daf770c.js:43362:23)
    at resolveConfig (/Users/lupeiwen/Documents/element-compoistion-admin-vite/node_modules/vite/dist/node/chunks/dep-3daf770c.js:81935:34)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async createServer (/Users/lupeiwen/Documents/element-compoistion-admin-vite/node_modules/vite/dist/node/chunks/dep-3daf770c.js:67541:20)
    at async CAC.<anonymous> (/Users/lupeiwen/Documents/element-compoistion-admin-vite/node_modules/vite/dist/node/cli.js:688:24)

Validations

@ydcjeff
Copy link
Contributor

ydcjeff commented Dec 9, 2021

Seems caused by #5601

Can you provide a reproduction?

Thanks!

@haoqunjiang haoqunjiang added the regression The issue only appears after a new release label Dec 9, 2021
@github-actions
Copy link

Hello @Lupeiwen0. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction regression The issue only appears after a new release
Projects
None yet
Development

No branches or pull requests

4 participants