由于意外令牌,Circleci构建失败

时间:2018-10-06 19:11:58

标签: webpack jhipster circleci

我是Jipster和CircleCi的新手 我正在尝试为我的项目做ci,但是我的构建因以下错误而失败:

  

node --max_old_space_size = 4096 node_modules / webpack / bin / webpack.js“ --config”“ webpack / webpack.prod.js”“ --profile”

    /home/circleci/repo/webpack/webpack.common.js:14
                ...rxPaths()
                ^^^

    SyntaxError: Unexpected token ...
        at NativeCompileCache._moduleCompile (/home/circleci/repo/node_modules/v8-compile-cache/v8-compile-c

引发异常的代码:

resolve: {
    extensions: ['.ts', '.js'],
    modules: ['node_modules'],
    alias: {
        app: utils.root('src/main/webapp/app/'),
        ...rxPaths()(this is line 14)
    }
}

我在其中安装节点的config.yml行

            # Install Node for JH Build
        - run:
              name: Download Node
              command: curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash
        - run:
              name: Install Node
              command: sudo apt-get install -y nodejs
        - run:
              name: update-npm
              command: sudo npm install -g npm@latest

        # Install Yarn
        - run:
              name: Download Yarn
              command: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
        - run:
              name: Install Yarn
              command: sudo apt-get update && sudo apt-get install yarn

每次构建运行时,我都会安装该节点。 我使用JHipster v5.4.1

编辑:我添加了config.yml

1 个答案:

答案 0 :(得分:0)

@anvk提示问题出在节点版本中。 我将版本升级到10,并且可以正常工作。