What are the challenges you face when working across database platforms? Take the survey

Flywaydb node issue request for assistance

Flyway14bisFlyway14bis Posts: 2 New member
edited April 19, 2024 7:12AM in Flyway (General Discussion)

I've updated from node v.16 to v.18 and keep getting flywaydb error messages (see below). Can someone assist please? 

npm ERR! throw er; // Unhandled 'error' event
DOWNLOADING https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/maven-metadata.xml
DOWNLOADING https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/9.22.3/flyway-commandline-9.22.3-linux-x64.tar.gz
throw er; // Unhandled 'error' event
Error: spawn tar ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:284:19)
at onErrorNT (node:internal/child_process:477:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:290:12)
at onErrorNT (node:internal/child_process:477:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn tar',
path: 'tar',
spawnargs: [

Best Answer

  • Options
    Jon_KirkwoodJon_Kirkwood Posts: 375 Silver 5

    Hi @Flyway14bis


    Thanks for reaching out on the Redgate forums and sorry to see this issue in updating your Flyway versions.


    Looking at the error you've provided, it appears that your pipeline is having issues accessing tar to open the flyway .tar.gz file.

    Are you able to confirm that you have tar installed in your environment and that your PATH includes the location of tar so it can be executed.


    It may also be an access issue on the downloaded file not being able to be opened/processed by tar. 

    This may be file access rights or the rights of the user running the pipeline.


    Depending on environment there may be different methods to get this resolved, but I would suggest the following


    Ensure tar is installed:

    <p><i>sudo apt-get update&nbsp;</i></p><p><i>sudo apt-get install tar</i></p>


    Check tar is installed in your PATH:

    echo $PATH


    If it isn't, add it in using

    export PATH=$PATH:<u>/path/to/tar</u> (changing this to actual path to tar)



    It may also be recommended to update your repo link from Maven to the following to see if it helps resolve this error.




    Jon Kirkwood | Technical Support Engineer | Redgate Software


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file