Issue 1:
On, my local machine macOS 10.12.1 babel-register works fine under Node 4.3.2. On Travis, it works fine under Node versions 6, 6.1 and 5.11, but for some reason, during the Travis build/test under Node 4.3.2, it just can't find babel-runtime/regenerator.

Here is my package.json.

Here is the raw Travis log:

Worker information
hostname: ip-10-12-9-52:29dd9498-7d66-4d46-baf9-d9cc8e2a9fb4
version: v2.5.0-8-g19ea9c2 https://github.com/travis-ci/worker/tree/19ea9c20425c78100500c7cc935892b47024922c
instance: f986739:travis:node_js
startup: 592.774995ms
Build system information
Build language: node_js
Build group: stable
Build dist: precise
Build id: 186403304
Job id: 186403308
travis-build version: 7cac7d393
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.5 LTS
Release:	12.04
Codename:	precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"

$ export DEBIAN_FRONTEND=noninteractive
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-amd64_Packages.gz is not what the server reported 13782 14904
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-amd64_Packages.gz is not what the server reported 19576 20785
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages.gz is not what the server reported 13751 14885
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages.gz is not what the server reported 19521 20707
W: Size of file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_precise-backports_multiverse_source_Sources.gz is not what the server reported 5886 5888
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_travis-ci_zero-mq_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 832 1195
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-amd64_Packages.gz is not what the server reported 33653 36677
W: Size of file /var/lib/apt/lists/ppa.launchpad.net_ubuntugis_ppa_ubuntu_dists_precise_main_binary-i386_Packages.gz is not what the server reported 33699 36733
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libc-bin libc-dev-bin libc6-dev
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc-bin libc-dev-bin libc6 libc6-dev
4 upgraded, 0 newly installed, 0 to remove and 250 not upgraded.
Need to get 8,840 kB of archives.
After this operation, 14.3 kB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6-dev amd64 2.15-0ubuntu10.15 [2,943 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-dev-bin amd64 2.15-0ubuntu10.15 [84.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc-bin amd64 2.15-0ubuntu10.15 [1,177 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libc6 amd64 2.15-0ubuntu10.15 [4,636 kB]
Fetched 8,840 kB in 0s (36.2 MB/s)
Preconfiguring packages ...
(Reading database ... 69991 files and directories currently installed.)
Preparing to replace libc6-dev 2.15-0ubuntu10.10 (using .../libc6-dev_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.15-0ubuntu10.10 (using .../libc-dev-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc-bin 2.15-0ubuntu10.10 (using .../libc-bin_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.15-0ubuntu10.15) ...
(Reading database ... 69990 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.10 (using .../libc6_2.15-0ubuntu10.15_amd64.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.15-0ubuntu10.15) ...
Setting up libc-dev-bin (2.15-0ubuntu10.15) ...
Setting up libc6-dev (2.15-0ubuntu10.15) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
$ git clone --depth=50 --branch=master https://github.com/resistdesign/incarnate.git resistdesign/incarnate
Cloning into 'resistdesign/incarnate'...
remote: Counting objects: 169, done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 169 (delta 83), reused 97 (delta 27), pack-reused 0
Receiving objects: 100% (169/169), 25.71 KiB | 0 bytes/s, done.
Resolving deltas: 100% (83/83), done.
Checking connectivity... done.

$ cd resistdesign/incarnate
$ git checkout -qf a4acffa37fb005d344ae0ad8d56a6aa9213b40a9

This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.
Updating nvm to v0.32.0
$ nvm install 4.3.2
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v4.3.2 (npm v2.14.12)

Starting with io.js 3 and Node.js 4, building native extensions requires C++11-compatible compiler, which seems unavailable on this VM. Please read https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements.
$ node --version
v4.3.2
$ npm --version
2.14.12
$ nvm --version
0.32.0
$ npm install
npm WARN optional dep failed, continuing fsevents@1.0.15
mocha@3.2.0 node_modules/mocha
├── diff@1.4.0
├── browser-stdout@1.3.0
├── escape-string-regexp@1.0.5
├── growl@1.9.2
├── json3@3.3.2
├── supports-color@3.1.2 (has-flag@1.0.0)
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── debug@2.2.0 (ms@0.7.1)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── glob@7.0.5 (path-is-absolute@1.0.1, inherits@2.0.3, fs.realpath@1.0.0, once@1.4.0, inflight@1.0.6, minimatch@3.0.3)
└── lodash.create@3.1.1 (lodash._basecreate@3.0.3, lodash._isiterateecall@3.0.9, lodash._baseassign@3.2.0)

expect@1.20.2 node_modules/expect
├── is-regex@1.0.3
├── object-keys@1.0.11
├── object-inspect@1.2.1
├── tmatch@2.0.1
├── has@1.0.1 (function-bind@1.1.0)
├── define-properties@1.1.2 (foreach@2.0.5)
└── is-equal@1.5.3 (is-arrow-function@2.0.3, is-number-object@1.0.3, is-date-object@1.0.1, is-string@1.0.4, is-callable@1.1.3, is-boolean-object@1.0.0, is-symbol@1.0.1, is-generator-function@1.0.6, object.entries@1.0.4)

npm-watch@0.1.7 node_modules/npm-watch
├── through2@2.0.3 (xtend@4.0.1, readable-stream@2.2.2)
└── nodemon@1.11.0 (ignore-by-default@1.0.1, undefsafe@0.0.3, es6-promise@3.3.1, debug@2.5.1, minimatch@3.0.3, touch@1.0.0, lodash.defaults@3.1.2, ps-tree@1.1.0, update-notifier@0.5.0, chokidar@1.6.1)

event-emitter@0.3.4 node_modules/event-emitter
├── d@0.1.1
└── es5-ext@0.10.12 (es6-symbol@3.1.0, es6-iterator@2.0.0)

babel-register@6.18.0 node_modules/babel-register
├── home-or-tmp@2.0.0 (os-tmpdir@1.0.2, os-homedir@1.0.2)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── source-map-support@0.4.7 (source-map@0.5.6)
├── babel-core@6.21.0 (babel-template@6.16.0, babel-messages@6.8.0, slash@1.0.0, path-is-absolute@1.0.1, babel-helpers@6.16.0, private@0.1.6, json5@0.5.1, babylon@6.14.1, convert-source-map@1.3.0, source-map@0.5.6, babel-types@6.21.0, debug@2.5.1, minimatch@3.0.3, babel-code-frame@6.20.0, babel-traverse@6.21.0, babel-generator@6.21.0)
├── babel-runtime@6.20.0 (regenerator-runtime@0.10.1)
├── lodash@4.17.2
└── core-js@2.4.1

babel-plugin-transform-object-rest-spread@6.20.2 node_modules/babel-plugin-transform-object-rest-spread
├── babel-plugin-syntax-object-rest-spread@6.13.0
└── babel-runtime@6.20.0 (regenerator-runtime@0.10.1, core-js@2.4.1)

babel-plugin-transform-runtime@6.15.0 node_modules/babel-plugin-transform-runtime
└── babel-runtime@6.20.0 (regenerator-runtime@0.10.1, core-js@2.4.1)

babel-plugin-transform-class-properties@6.19.0 node_modules/babel-plugin-transform-class-properties
├── babel-plugin-syntax-class-properties@6.13.0
├── babel-template@6.16.0 (babylon@6.14.1, babel-types@6.21.0, babel-traverse@6.21.0, lodash@4.17.2)
├── babel-helper-function-name@6.18.0 (babel-helper-get-function-arity@6.18.0, babel-types@6.21.0, babel-traverse@6.21.0)
└── babel-runtime@6.20.0 (regenerator-runtime@0.10.1, core-js@2.4.1)

babel-preset-env@1.1.4 node_modules/babel-preset-env
├── babel-plugin-syntax-trailing-function-commas@6.20.0
├── browserslist@1.5.1 (caniuse-db@1.0.30000602)
├── babel-plugin-transform-es2015-for-of@6.18.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-literals@6.8.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-modules-umd@6.18.0 (babel-template@6.16.0, babel-runtime@6.20.0)
├── babel-plugin-check-es2015-constants@6.8.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-typeof-symbol@6.18.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-duplicate-keys@6.8.0 (babel-types@6.21.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-template-literals@6.8.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-arrow-functions@6.8.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-block-scoped-functions@6.8.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-destructuring@6.19.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-shorthand-properties@6.18.0 (babel-types@6.21.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-modules-amd@6.18.0 (babel-template@6.16.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-spread@6.8.0 (babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-function-name@6.9.0 (babel-types@6.21.0, babel-helper-function-name@6.18.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-block-scoping@6.21.0 (babel-template@6.16.0, babel-types@6.21.0, babel-traverse@6.21.0, lodash@4.17.2, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-unicode-regex@6.11.0 (regexpu-core@2.0.0, babel-helper-regex@6.18.0, babel-runtime@6.20.0)
├── babel-plugin-transform-exponentiation-operator@6.8.0 (babel-plugin-syntax-exponentiation-operator@6.13.0, babel-helper-builder-binary-assignment-operator-visitor@6.18.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-computed-properties@6.8.0 (babel-template@6.16.0, babel-helper-define-map@6.18.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-sticky-regex@6.8.0 (babel-helper-regex@6.18.0, babel-types@6.21.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-object-super@6.8.0 (babel-helper-replace-supers@6.18.0, babel-runtime@6.20.0)
├── babel-plugin-transform-async-to-generator@6.16.0 (babel-plugin-syntax-async-functions@6.13.0, babel-helper-remap-async-to-generator@6.20.3, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-modules-systemjs@6.19.0 (babel-template@6.16.0, babel-helper-hoist-variables@6.18.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-modules-commonjs@6.18.0 (babel-plugin-transform-strict-mode@6.18.0, babel-template@6.16.0, babel-types@6.21.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-parameters@6.21.0 (babel-helper-get-function-arity@6.18.0, babel-helper-call-delegate@6.18.0, babel-template@6.16.0, babel-types@6.21.0, babel-traverse@6.21.0, babel-runtime@6.20.0)
├── babel-plugin-transform-es2015-classes@6.18.0 (babel-messages@6.8.0, babel-helper-replace-supers@6.18.0, babel-helper-optimise-call-expression@6.18.0, babel-helper-function-name@6.18.0, babel-template@6.16.0, babel-helper-define-map@6.18.0, babel-types@6.21.0, babel-traverse@6.21.0, babel-runtime@6.20.0)
└── babel-plugin-transform-regenerator@6.21.0 (regenerator-transform@0.9.8)

$ npm test

> @resistdesign/incarnate@0.0.0 test /home/travis/build/resistdesign/incarnate
> mocha -u exports --require babel-register -- '**/*.spec.js'

module.js:327
throw err;
^

Error: Cannot find module 'babel-runtime/regenerator'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/travis/build/resistdesign/incarnate/src/Incarnate.spec.js:3:20)
at Module._compile (module.js:409:26)
at loader (/home/travis/build/resistdesign/incarnate/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/travis/build/resistdesign/incarnate/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at /home/travis/build/resistdesign/incarnate/node_modules/mocha/lib/mocha.js:222:27
at Array.forEach (native)
at Mocha.loadFiles (/home/travis/build/resistdesign/incarnate/node_modules/mocha/lib/mocha.js:219:14)
at Mocha.run (/home/travis/build/resistdesign/incarnate/node_modules/mocha/lib/mocha.js:487:10)
at Object.<anonymous> (/home/travis/build/resistdesign/incarnate/node_modules/mocha/bin/_mocha:459:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3
npm ERR! Test failed. See above for more details.

The command "npm test" exited with 1.

Done. Your build exited with 1.

Issue 2:
Bug Report

Current behavior

REPL, Codesandbox, or GitHub Repo helps!

Github repo

https://github.com/marcusjwhelan/dockerReact

Input Code

Startup without docker

npm run start

This works and all the development process continues with hot reload just fine.

However if I try to run the application in development mode only one package is not included in the node_modules and that is @babel/plugin-transform-runtime

docker-compose -f docker-compose-dev.yml build --no-cache
docker-compose -f docker-compose-dev.yml up
# or if first time
docker-compose -f docker-compose-dev.yml up --build

Expected behavior

The application should compile and run in docker like it did before having to add the transform runtime and @babel/runtime

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

Filename: babel.config.js

{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": 3,
"targets": "> 0.25%, not dead"
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-async-generator-functions",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-catch-binding",
"@babel/plugin-proposal-unicode-property-regex",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-transform-member-expression-literals",
"@babel/plugin-transform-property-literals",
"@babel/plugin-transform-reserved-words",
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-transform-block-scoped-functions",
"@babel/plugin-transform-block-scoping",
"@babel/plugin-transform-classes",
"@babel/plugin-transform-computed-properties",
"@babel/plugin-transform-destructuring",
"@babel/plugin-transform-duplicate-keys",
"@babel/plugin-transform-for-of",
"@babel/plugin-transform-function-name",
"@babel/plugin-transform-instanceof",
"@babel/plugin-transform-literals",
"@babel/plugin-transform-object-super",
"@babel/plugin-transform-parameters",
"@babel/plugin-transform-shorthand-properties",
"@babel/plugin-transform-spread",
"@babel/plugin-transform-sticky-regex",
"@babel/plugin-transform-template-literals",
"@babel/plugin-transform-typeof-symbol",
"@babel/plugin-transform-unicode-escapes",
"@babel/plugin-transform-unicode-regex",
"@babel/plugin-transform-exponentiation-operator",
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-transform-typescript"
]
}

Environment

Babel version(s): ^7.12.9 => 7.12.9

Node/npm version: 12.18.2 - C:\Program Files\nodejs\node.EXE

OS: Windows 10 10.0.18363

Monorepo: no

How you are using Babel: webpack cli

Additional context

webpack.config.dev.js

const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const WebpackPwaManifest = require('webpack-pwa-manifest')
const PATH_SOURCE = path.join(__dirname, './src')
const PATH_PUBLIC = path.join(__dirname, './public')
module.exports = {
mode: 'development',
target: 'web',
// webpack will take the files from ./src/index
entry: [
path.join(PATH_SOURCE, './index.tsx')
],

devtool: 'source-map',
// adding .ts and .tsx to resolve.extensions will help babel look for .ts and .tsx files to transpile
resolve: {
extensions: ['.wasm', '.ts', '.tsx', '.mjs', '.cjs', '.js', '.json', '.html']
},
stats: {
// warnings: false // in dev only -> suppress warnings
},
watchOptions: {
poll: true
},
module: {
rules: [

// we use babel-loader to load our jsx and tsx files
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
},
},

// css-loader to bundle all the css files into one file and style-loader to add all the styles inside the style tag of the document
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.json$/,
loader: 'json-loader',
type: 'javascript/auto'
},
{
test: /\.html$/,
exclude: /node_modules/,
loader: 'html-loader'
},
{
test: /\.(a?png|svg)$/,
loader: 'url-loader',
options: {
limit: 8192,
}
},
{
test: /\.(jpe?g|gif|bmp|mp3|mp4|ogg|wav|eot|ttf|woff|woff2)$/,
use: 'file-loader'
},
{
test: /\.ico$/,
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}
]
},

// development server configuration
devServer: {
hot: true,
port: 3000,
open: true,
// must be `true` for SPAs
historyApiFallback: true
},
optimization: {
splitChunks: {
cacheGroups: {
default: false,
vendors: false,

// vendor chunk
vendor: {
minChunks: 2,
// name of the chunk
name: 'vendor',

// async + async chunks
chunks: 'all',

// import file path containing node_modules
test: /node_modules/,

// priority
priority: 20
},

// common chunk
common: {
name: 'common',
minChunks: 2,
chunks: 'all',
priority: 10,
reuseExistingChunk: true,
enforce: true
}
}
}
},
plugins: [
new HtmlWebpackPlugin({
favicon: path.join(PATH_PUBLIC, './favicon.ico'),
template: path.join(PATH_PUBLIC, './index.html')
}),
new BundleAnalyzerPlugin(),
new WebpackPwaManifest({
name: 'example',
short_name: 'ex',
display: 'standalone',
theme_color: '#ffffff',
description: 'desc',
background_color: '#212121',
crossorigin: null, // can be null, use-credentials or anonymous
ios: {
'apple-mobile-web-app-title': 'Example',
'apple-mobile-web-app-status-bar-style': 'black'
},
icons: [
{
src: path.resolve('public/logo512.png'),
size: '512x512' // you can also use the specifications pattern
},
{
src: path.resolve('public/logo192.png'),
size: '192x192',
destination: path.join('icons', 'ios'),
ios: true
},
{
src: path.resolve('public/logo192.png'),
size: '192x192',
destination: path.join('icons', 'android')
}
]
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('development')
}
})
]
}

package.json

{
"name": "hmv1",
"version": "0.1.0",
"description": "Example",
"main": "index.js",
"scripts": {
"bundle": "webpack --mode=production --config=webpack.config.js",
"start": "webpack serve --config=webpack.config.dev.js --mode=development --host 127.0.0.1",
"start_docker": "webpack serve --config=webpack.config.dev.js --mode=development --host 0.0.0.0",
"compose_start": "docker-compose -f docker-compose-dev.yml up --build",
"docker_build_dev": "docker build -f Dockerfile.dev -t react-dev-tag .",
"docker_start_dev": "docker run -v \"%cd%\":/var/www -v /var/www/node_modules -p 8080:8080 -ti --rm --name dev-react-name react-dev-tag",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Marcus Whelan",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/plugin-proposal-async-generator-functions": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-export-namespace-from": "^7.12.1",
"@babel/plugin-proposal-logical-assignment-operators": "^7.12.1",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-proposal-optional-catch-binding": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/plugin-proposal-unicode-property-regex": "^7.12.1",
"@babel/plugin-transform-arrow-functions": "^7.12.1",
"@babel/plugin-transform-async-to-generator": "^7.12.1",
"@babel/plugin-transform-block-scoped-functions": "^7.12.1",
"@babel/plugin-transform-block-scoping": "^7.12.1",
"@babel/plugin-transform-classes": "^7.12.1",
"@babel/plugin-transform-computed-properties": "^7.12.1",
"@babel/plugin-transform-destructuring": "^7.12.1",
"@babel/plugin-transform-duplicate-keys": "^7.12.1",
"@babel/plugin-transform-exponentiation-operator": "^7.12.1",
"@babel/plugin-transform-for-of": "^7.12.1",
"@babel/plugin-transform-function-name": "^7.12.1",
"@babel/plugin-transform-instanceof": "^7.12.1",
"@babel/plugin-transform-literals": "^7.12.1",
"@babel/plugin-transform-member-expression-literals": "^7.12.1",
"@babel/plugin-transform-object-super": "^7.12.1",
"@babel/plugin-transform-parameters": "^7.12.1",
"@babel/plugin-transform-property-literals": "^7.12.1",
"@babel/plugin-transform-reserved-words": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/plugin-transform-shorthand-properties": "^7.12.1",
"@babel/plugin-transform-spread": "^7.12.1",
"@babel/plugin-transform-sticky-regex": "^7.12.7",
"@babel/plugin-transform-template-literals": "^7.12.1",
"@babel/plugin-transform-typeof-symbol": "^7.12.1",
"@babel/plugin-transform-typescript": "^7.12.1",
"@babel/plugin-transform-unicode-escapes": "^7.12.1",
"@babel/plugin-transform-unicode-regex": "^7.12.1",
"@types/crypto-js": "^4.0.1",
"@types/jest": "^26.0.15",
"@types/js-cookie": "^2.2.6",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-redux": "^7.1.11",
"@types/react-router": "^5.1.8",
"@types/react-router-dom": "^5.1.6",
"@types/redux-logger": "^3.0.8",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/eslint-plugin-tslint": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.0.1",
"eslint": "^7.14.0",
"eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-react-hooks": "^4.2.0",
"fibers": "^5.0.0",
"file-loader": "^6.2.0",
"html-loader": "^1.3.2",
"html-webpack-plugin": "^4.5.0",
"identity-obj-proxy": "^3.0.0",
"imports-loader": "^1.2.0",
"json-loader": "^0.5.7",
"redux-logger": "^3.0.6",
"resolve-url-loader": "^3.1.2",
"source-map-loader": "^1.1.2",
"style-loader": "^2.0.0",
"ts-loader": "^8.0.11",
"typescript": "^4.1.2",
"url-loader": "^4.1.1",
"webpack": "^5.9.0",
"webpack-bundle-analyzer": "^4.2.0",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^4.0.0-beta.0",
"webpack-pwa-manifest": "^4.3.0"
},
"dependencies": {
"@babel/preset-env": "^7.12.7",
"@babel/preset-react": "^7.12.7",
"@babel/preset-typescript": "^7.12.7",
"@babel/runtime": "^7.12.5",
"@babel/runtime-corejs3": "^7.12.5",
"@material-ui/core": "^4.11.1",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.56",
"axios": "^0.21.0",
"connected-react-router": "^6.8.0",
"crypto-js": "^4.0.0",
"history": "^5.0.0",
"jquery": "^3.5.1",
"js-cookie": "^2.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-spring": "^8.0.27",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0"
}
}

The error

docker-compose -f docker-compose-dev.yml up
Recreating docker_react_dev_container ... done
Attaching to docker_react_dev_container
docker_react_dev_container |
docker_react_dev_container | > hmv1@0.1.0 start_docker /var/www
docker_react_dev_container | > webpack serve --config=webpack.config.dev.js --mode=development --host 0.0.0.0
docker_react_dev_container |
docker_react_dev_container | <i> [webpack-dev-server] Project is running at http://0.0.0.0:3000/
docker_react_dev_container | <i> [webpack-dev-server] Content not from webpack is served from /var/www
docker_react_dev_container | <i> [webpack-dev-server] 404s will fallback to /index.html
docker_react_dev_container | (node:23) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
docker_react_dev_container | BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
docker_react_dev_container | Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
docker_react_dev_container | Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
docker_react_dev_container | (Use `node --trace-deprecation ...` to show where the warning was created)
docker_react_dev_container | Error parsing bundle asset "/var/www/dist/main.js": no such file
docker_react_dev_container |
docker_react_dev_container | No bundles were parsed. Analyzer will show only original module sizes from stats file.
docker_react_dev_container |
docker_react_dev_container | Webpack Bundle Analyzer is started at http://127.0.0.1:8888
docker_react_dev_container | Use Ctrl+C to close it
docker_react_dev_container | <e> [webpack-dev-middleware] assets by path icons/ 46.3 KiB
docker_react_dev_container | <e> asset icons/android/icon_192x192.4b84f1f7e81945d33680dacbfc230eaa.png 23.1 KiB [emitted]
docker_react_dev_container | <e> asset icons/ios/icon_192x192.4b84f1f7e81945d33680dacbfc230eaa.png 23.1 KiB [emitted]
docker_react_dev_container | <e> asset main.js 250 KiB [emitted] (name: main) 1 related asset
docker_react_dev_container | <e> asset icon_512x512.27f2880700cd02fe09aa71289ac8b7f7.png 29.8 KiB [emitted]
docker_react_dev_container | <e> asset favicon.ico 3.78 KiB [emitted]
docker_react_dev_container | <e> asset index.html 1.03 KiB [emitted]
docker_react_dev_container | <e> asset manifest.de05c92f23f6c327d93c915bc9ebcc42.json 656 bytes [emitted]
docker_react_dev_container | <e> runtime modules 24.8 KiB 10 modules
docker_react_dev_container | <e> cacheable modules 193 KiB
docker_react_dev_container | <e> modules by path ./node_modules/webpack-dev-server/client/ 71 KiB 12 modules
docker_react_dev_container | <e> modules by path ./node_modules/webpack/hot/*.js 4.3 KiB 4 modules
docker_react_dev_container | <e> modules by path ./node_modules/html-entities/lib/*.js 57.9 KiB 4 modules
docker_react_dev_container | <e> modules by path ./node_modules/url/ 37.4 KiB 3 modules
docker_react_dev_container | <e> modules by path ./node_modules/querystring/*.js 4.51 KiB
docker_react_dev_container | <e> ./node_modules/querystring/index.js 127 bytes [built] [code generated]
docker_react_dev_container | <e> ./node_modules/querystring/decode.js 2.34 KiB [built] [code generated]
docker_react_dev_container | <e> ./node_modules/querystring/encode.js 2.04 KiB [built] [code generated]
docker_react_dev_container | <e> ./src/index.tsx 39 bytes [built] [code generated] [1 error]
docker_react_dev_container | <e> ./node_modules/ansi-html/index.js 4.16 KiB [built] [code generated]
docker_react_dev_container | <e> ./node_modules/events/events.js 13.8 KiB [built] [code generated]
docker_react_dev_container | <e> ./node_modules/webpack/hot/ sync nonrecursive ^\.\/log$ 170 bytes [built] [code generated]
docker_react_dev_container | <e>
docker_react_dev_container | <e> ERROR in ./src/index.tsx
docker_react_dev_container | <e> Module build failed (from ./node_modules/babel-loader/lib/index.js):
docker_react_dev_container | <e> Error: Cannot find module '@babel/plugin-transform-runtime' from '/var/www'
docker_react_dev_container | <e> at Function.resolveSync [as sync] (/var/www/node_modules/resolve/lib/sync.js:90:15)
docker_react_dev_container | <e> at resolveStandardizedName (/var/www/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
docker_react_dev_container | <e> at resolvePlugin (/var/www/node_modules/@babel/core/lib/config/files/plugins.js:54:10)
docker_react_dev_container | <e> at loadPlugin (/var/www/node_modules/@babel/core/lib/config/files/plugins.js:62:20)
docker_react_dev_container | <e> at createDescriptor (/var/www/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
docker_react_dev_container | <e> at /var/www/node_modules/@babel/core/lib/config/config-descriptors.js:109:50
docker_react_dev_container | <e> at Array.map (<anonymous>)
docker_react_dev_container | <e> at createDescriptors (/var/www/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
docker_react_dev_container | <e> at createPluginDescriptors (/var/www/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
docker_react_dev_container | <e> at plugins (/var/www/node_modules/@babel/core/lib/config/config-descriptors.js:40:19)
docker_react_dev_container | <e>
docker_react_dev_container | <e> webpack 5.9.0 compiled with 1 error in 5969 ms
docker_react_dev_container | <i> [webpack-dev-middleware] Failed to compile.