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

Errors happening in other folders point to the wrong file #4667

Closed
7 tasks done
posva opened this issue Aug 20, 2021 · 1 comment
Closed
7 tasks done

Errors happening in other folders point to the wrong file #4667

posva opened this issue Aug 20, 2021 · 1 comment

Comments

@posva
Copy link
Contributor

posva commented Aug 20, 2021

Describe the bug

While developing, some errors can crash the error formatted by trying to access non existing lines. This seems to happen with:

  • An npm package referring to a folder outside of the project
  • Using Tailwind + postcssnon-existing

I didn't manage to crash the server in the reproduction as it does in my dev environment but the crash happened at

start += lines[i].length + 1

(which is where the cannot read property 'length' of undefined happens)

Reproduction

  • Clone https://github.com/posva/vite-tailwind-bug-error-report
  • Go to project and npm i with npm 7
  • npm run dev
  • You should see an error
    Internal server error: Cannot read property 'length' of undefined
    
  • Remove the whole comment in package/style.css
  • See the actual error is pointing to the wrong file and the line + column is just happening to also exist in the local file theme.css

System Info

System:
    OS: macOS 11.5.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
    Memory: 1.54 GB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 16.6.1 - ~/.nvm/versions/node/v16.6.1/bin/node
    Yarn: 1.22.11 - ~/.nvm/versions/node/v16.6.1/bin/yarn
    npm: 7.20.3 - ~/.nvm/versions/node/v16.6.1/bin/npm

Used Package Manager

npm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented Mar 18, 2022

This seems to be fixed since #6293

I now get

image

@bluwy bluwy closed this as completed Mar 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants