The project is basically a NodeJS and ReactJS project

I have an undertaking which is building effectively on Jenkins however when I endeavor to manufacture utilizing AWS Codebuild it gives a plugin error. The venture is fundamentally a NodeJS and ReactJS venture. We would prefer not to move to Jenkins as we are serverless and introducing jenkins requires one EC2 occurrence. We would prefer not to keep up any server. I have attempted underneath conditions for AWS codebuild:

aws/codebuild/ubuntu-base:14.04
aws/codebuild/nodejs:6.3.1
aws/codebuild/nodejs:7.0.0
aws/codebuild/nodejs:4.4.7

The first four commands of my buildspec.yml is executed only when I use aws/codebuild/ubuntu-base:14.04 codebuild environment. Otherwise only last three commands are part of my buildspec.yml

Below is my buildspec.yml

version: 0.1

phases:
  build:
    commands:
      - sudo apt-get update 
      - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
      - sudo apt-get install -y nodejs
      - sudo apt-get install -y build-essential
      - npm install
      - npm run dev
      - aws s3 cp --recursive dist/ s3://$AWS_BUCKET_NAME/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers

Below is my error logs in AWS codebuild during npm run

ERROR in 
Child html-webpack-plugin for "index.html":
+ 3 hidden modules

Also, I get following warning during npm install in Codebuild but I do not get the this warning in Jenkins

npm WARN deprecated babel-plugin-react-hot@1.0.4: This plugin is no longer maintained. Please use babel-plugin-react-transform with react-transform-hot-reload instead.

Below is my webpack.config.js

var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var FlowStatusWebpackPlugin = require('flow-status-webpack-plugin');

module.exports = {
    entry: [
        './src/app/index.js'
    ],
    output: {
        path: __dirname + '/dist',
        filename: 'index_bundle.js'
    },
    module: {
        loaders: [
            {
                test: /\.json$/,
                loader: 'json'
            },
            {
                test: /\.js$/,
                exclude: /(node_modules|test)/,
                loaders: ["babel-loader"]
            },
            {
                test: /\.(css|scss)$/,
                loaders: ['style', 'css', 'sass-loader']
            },
            {
                test: /\.(png|woff|woff2|eot|ttf|svg)$/,
                loader: 'url-loader',
                options: {
                    limit: 100000,
                    name: 'assets/[hash].[ext]'
                }
            },
            {

Thanks,
Sarika