Replies: 1 comment
-
It looks like following the error message suggestion was the right thing to do, but not just in the CI but locally to.
Now, the build works locally and on CI, with Vite 6.2.3 Sorry for the noise. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to start by saying I don't know much about package management, but here we go.
I'm developing a Laravel application on Mac but my CI is on Linux (BitBucket pipelines).
My
package.json
includes"vite": "^6.0.11"
, which at the time of writing installed 6.2.3. It's worth mentioning that bothpackage.json
andpackage-lock.json
are committed to the repository. This is because I will be building a Docker image from the code to use in production and I want the versions in production to match exactly what I would have in development. So rebuilding the lock file is not an option.Locally
npm run build
works, but in my CI it fails with the errorI had a look the issue mentioned, but is has been raised 3 years ago and it has not been fixed yet. All workarounds seems to be to remove
package-lock.json
in my CI (which is also what the error suggests) but as I said above I am not prepared to do that.It has also been suggested to use Docker on my Mac and effectively develop on Linux. I'm not prepared to do that either. Sorry, I know there are a lot of dont-wants, but I don't think they are unreasonable.
After some digging it seems that the issue starts with Vite 6.2.0. If I downgrade to Vite 6.1.2, remove the lock file, and install the packages again, then the build works, both locally and on CI.
Obviously I can downgrade Vite to the exact version for now, but I would like not to have to do that going forward.
I have found a few other discussions here about this, but they all seems to suggest to add optional dependencies in my
package.json
. I think that's another workaround, not really a solution."So, what exactly are you asking?" you may be saying.
Well, here we go
Beta Was this translation helpful? Give feedback.
All reactions