bayesimpact/docker-react

Unable to run bayesimpact/react-base:latest

davidjguru opened this issue · 0 comments

Hello, I was checking the image in order to add it in an existing project but I can't run the resource due to errors.
I was testing directly from Docker and also from DDEV (a docker derivative for PHP-based projects), just like an added new service. But the image doesn't run, it returns:

> bayesimpact-react@0.0.1 start
> REACT_WEBPACK_ENV=dev node server.js

/usr/app/cfg/base.js:5
const imageMinSvg = require('imagemin-svgo')
                    ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/app/node_modules/imagemin-svgo/index.js from /usr/app/cfg/base.js not supported.
Instead change the require of index.js in /usr/app/cfg/base.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/usr/app/cfg/base.js:5:21)
    at Object.<anonymous> (/usr/app/cfg/dev.js:7:20)
    at Object.<anonymous> (/usr/app/webpack.config.js:18:8)
    at Object.<anonymous> (/usr/app/server.js:4:14) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v17.7.1

See caption:

Selection_424

The result is the same from Docker and from DDEV. The error seems to be new versions in some resources.
Related

Stack

Context: Linux
SO: Ubuntu 20.04.4 LTS
Docker version: Docker version 20.10.14, build a224086
Docker Compose version: docker-compose version 1.25.0
DDEV version: ddev version v1.17.7