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

Frequent Vite Optimize Info errors #1039

Closed
james-rae opened this issue May 13, 2022 · 5 comments · Fixed by #1153
Closed

Frequent Vite Optimize Info errors #1039

james-rae opened this issue May 13, 2022 · 5 comments · Fixed by #1153
Assignees
Labels
flavour: build Changes to the build process priority: low Has value, but is not a priority type: preventative Reduce complexity, improve quality. Preventative Management Bucket

Comments

@james-rae
Copy link
Member

Related to #974

Vite Error: optimized info should be defined

The issue above provides a working fix. But this problem happens all the time, not just when updating dependencies. It's also happening with a good number of team members. Frequently watching your dev build die, then having to clear out caches and do it over adds up when it comes to wasted time.

Would like to see a preventative solution found instead the fix-after-it-breaks path we currently have.

Maybe the npm run dev can run some sort of pre-clean? Alternately a search around the internet could reveal better solutions (I'd guess killing the cache before each run has some efficiency detriment when things don't mess up).

@james-rae james-rae added flavour: build Changes to the build process priority: low Has value, but is not a priority type: preventative Reduce complexity, improve quality. Preventative Management Bucket needs: estimate We haven't assigned an effort value to this issue labels May 13, 2022
@roryhofland
Copy link
Member

An alternative solution for #974 that I have found is manually renaming .vite/processing to .vite/deps after the build appears to fail, then firing another npm run dev. This makes me wonder if there is some sort of race condition happening where Vite has trouble with the file names.

I've also seen some mention online that it could be some sort of read-only/permission issue with .vite, which could explain why it is not happening to all members on the team.

@milespetrov milespetrov self-assigned this Jun 15, 2022
@milespetrov milespetrov removed the needs: estimate We haven't assigned an effort value to this issue label Jun 15, 2022
@james-rae james-rae reopened this Jun 16, 2022
@james-rae
Copy link
Member Author

james-rae commented Jun 16, 2022

Heh I was so happy this was fixed, pulled too early. 👮
The error is indeed gone, but now appears the npm run build goes indefinitely (or at least 40 minutes as I'm typing this).

https://github.com/ramp4-pcar4/ramp4-pcar4/actions/runs/2509693813

Am seeing the same thing when doing the command locally.

Update: local build finished in about 20 mins. Github hosted one takes around an hour.

@milespetrov
Copy link
Member

I'll keep an eye out for when this gets fixed by the Vite folks.

Breaking PR
Tracking issue

@james-rae
Copy link
Member Author

Problem on our end fixed for now by #1159
Will keep issue alive for a bit just to track what happens on the Vite side.

@james-rae
Copy link
Member Author

Have not encountered in a few months. Well done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flavour: build Changes to the build process priority: low Has value, but is not a priority type: preventative Reduce complexity, improve quality. Preventative Management Bucket
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants