Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

The engine "node" is incompatible error when trying to deploy site via bitbucket pipeline

DS February 8, 2022

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/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

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. 

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 9, 2022

Hello @DS ,

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 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 .

Kind regards,

Patrik S

Dante Solis March 25, 2022

@Patrik S 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`

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events