Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-15803

Pipelines build fails when webpack babel processing doesn't run on JS files

    XMLWordPrintable

Details

    Description

      We have a projet in node with webpack.
      If we run pipeline commands directly from the latest docker images of node:9-alpine, everything is Ok.
      In bitbucket, the pipeline fails.

      The attached archive contains code to reproduce.

      The relevant part of the error message is:

      ERROR in ./src/index.js
      Module parse failed: /opt/atlassian/pipelines/agent/build/src/index.js Unexpected token (9:10)
      You may need an appropriate loader to handle this file type.
      |    * Webpack fails with this declaration in pipelines
      |    */
      |   getProp = () => this.props;
      | 
      |   setProp(props) {
      error An unexpected error occurred: "Command failed.
      Exit code: 2
      Command: sh
      Arguments: -c ./node_modules/.bin/webpack
      Directory: /opt/atlassian/pipelines/agent/build
      

      Attachments

        1. pipelineLog-5.txt
          2 kB
        2. project.tar.xz
          25 kB

        Activity

          People

            Unassigned Unassigned
            18d9e3a01202 François MUSY
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: