I am getting this error on my builds after moving from Webpacker to Vite Ruby with a Rails 6 app on Ruby 3.2
npm ERR! @esbuild/android-arm not accessible from esbuild
I’ve explicitly marked the android-arm dependency as optional in my package.json
"optionalDependencies": {
"esbuild-android-64": "^0.15.18"
}
I’ve found a couple of StackOverflow discussions
- https://stackoverflow.com/questions/73114555/package-not-accessible-from-esbuild-what-does-this-error-mean
- https://stackoverflow.com/questions/75326640/esbuild-fails-due-to-missing-android-arm-when-running-on-ubuntu-x86-64-on-github
It seems that updating npm would fix it but I’m not sure how to do that with the render.yml
In a GitHub Action I would just add another step to build.
Any help would be appreciated.
EDIT
I got it working by deleting the package-lock.json and just using the yarn.lock file. Leaving this in case it helps anyone else.
#rails #vite #ruby