pipeline test environment doesn't use correct node.js version

XMLWordPrintable

      Here is my bitbucket-pipelines.yml:

      # This is a sample build configuration for JavaScript.
      # Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
      # Only use spaces to indent your .yml configuration.
      # -----
      # You can specify a custom docker image from Docker Hub as your build environment.
      image: node:10.13.0
      
      pipelines:
        default:
          - step:
              caches:
                - node
              script: # Modify the commands below to build your repository.
                - npm config set -g production false
                - npm install
                - npm test
      

      The nodejs version I specified is 10.13.0 however the logs show that the default version 6.9.4 is used:

      + npm test
      npm info it worked if it ends with ok
      npm info using npm@3.10.10
      npm info using node@v6.9.4
      npm info lifecycle frezy_server@1.0.0~pretest: frezy_server@1.0.0
      npm info lifecycle frezy_server@1.0.0~test: frezy_server@1.0.0
      > frezy_server@1.0.0 test /opt/atlassian/pipelines/agent/build
      > mocha router/**/*.test.js
      /opt/atlassian/pipelines/agent/build/utils/utils.js:57
      exports.get_rate = async (crypto, currency) => {
                               ^
      SyntaxError: Unexpected token (
      

            Assignee:
            Unassigned
            Reporter:
            Guy Pavlov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: