Can't run npm command on VM, results in "Volta error: Could not download node"

I am trying to run an npm command on my deployed app by connecting to VM using flyctl ssh console and then navigating to app/ and running npm run seed. This gives me the following error (even though I’ve specified node version in Dockerfile)

Volta error: Could not download node@18.10.0

Please verify your internet connection and ensure the correct version is specified.
Error details written to /.volta/log/volta-error-2023-02-01_15_49_34.852.log

And when I look inside error log, I get this:

Error cause: Io Error: invalid peer certificate contents: invalid peer certificate: UnknownIssuer

Does anyone have any ideas what could be causing this?

I’ve found this github issue relating to volta version 1.1.1 which appears to be related to this issue

1 Like

Am also encountering same issue. Not sure if fix has made it into base image?

At one time Dockerfiles produced by fly launch used to reference volta, but recent versions of flyctl do not. What version of flyctl do you have installed and what framework does your application use?

I have flyctl 0.0.544.

My app is a node app, so I did try adding to package.json as @ivan1 did in another thread, but led to this issue

Starting with 0.0.529, the node scanner no longer referenced volta, so I am at a loss as to why it would appear in your Dockerfile.

Can you share your dockerfile?

Alternately if you haven’t made significant changes to the dockerfile, you can try out the new dockrfile generator that I plan to roll out later this week:

npx --yes @flydotio/dockerfile@latest

If you try this, it might be a good idea to save the previous dockerfile as I’m still running tests.