The engine "node" is incompatible error when trying to deploy site via bitbucket pipeline
Asked by DS:

I'm trying to deploy my site after via \`bitbucket-pipeline\` after updating some of the dependencies, but I'm getting the following error

```

error [@MUI](/t5/user/viewprofilepage/user-id/1343332)/icons-material@5.3.1: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.19.0"  
```  
My `bitbucket-pipeline.yml` looks like this  

```
image: node:10.15.3

pipelines:

  branches:

    master:

      - step:

          name: Deploying development ?

          caches:

            - nodeall

            - yarn

          script:

            - echo 'Connecting to remote server to update repo'

            - pipe: atlassian/ssh-run:0.2.2

              variables:

                SSH_USER: $USER

                SERVER: $SERVER_ADRESS

                COMMAND: 'cd smiling-scripts && bash frontend-deploy-development.sh'

```

definitions:  
caches:  
nodeall: ./node_modules  
yarn: /usr/local/share/.cache/yarn

```


...omitted_code
```

<br />

I have tried updating `image: node:10.15.3` to `image:node:lts` and `image: node:14.15.0` but I still get the same error.   


Answers:
author: Patrik S
body: Hello [@DS](/t5/user/viewprofilepage/user-id/4183757) ,

Thank you for reaching out to Atlassian Community.

From the error message you are receiving, the node engine that you currently have setup in your application is outdated for the dependencies you are installing.

That said, I noticed you have configured node and yarn caches in your pipeline, and I've seen some issues in the past caused by outdated caches. In this case, I would recommend you manually deleting all the caches and trying to run your build again. This will make all dependencies to be download directly from the internet, and the cache will be rebuilt with the updated ones. To manually delete the cache refer to the steps below :

1. Go to **Pipelines** page of your repository.
2. Select the button **Cache** in the top right corner
3. Delete all the caches by clicking on the **trash icon**
4. Trigger a new build

If after clearing the cache you still face the issue, it might be related to how you have your node/yarn packages configured. After doing some research, I found [this question on Stackoverflow](https://stackoverflow.com/questions/66429081/the-engine-node-is-incompatible-with-this-module-expected-version-12-x-got) with similar issue, and some of the suggestions were :

* To update your packages.json with the more recent node version (the same version as the docker image used in the build) :   
  *

         "engines": {     "node": "14.15.0" }

* To remove the yarn.lock file and try running again
  *

        rm ./yarn.lock

* To use the *--ignore-engines* in the yarn command
  *

        yarn install --ignore-engines

Hope that helps. Let us know how it goes and if you run into any issues trying the suggestions above.

Thanks, [@DS](/t5/user/viewprofilepage/user-id/4183757) .

Kind regards,

Patrik S

comments: author: Dante Solis
body: [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) I ended up using \`yarn install --ignore-engines\` as a quick solution. For some reason after deleting cache and removing the \`yarn.lock\` the docker on the pipeline still was tellling me I was using \`node: version 10.15.3\` even though i have updated to \`node: version 15.2.1\`


Tags: bitbucket-cloud

bitbucket-pipelines

cloud