bayesimpact / bayesimpact/docker-react

Unable to run bayesimpact/react-base:latest

Open
#4,200 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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)](https://ddev.readthedocs.io/en/stable/), 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. (/usr/app/cfg/base.js:5:21)
at Object. (/usr/app/cfg/dev.js:7:20)
at Object. (/usr/app/webpack.config.js:18:8)
at Object. (/usr/app/server.js:4:14) {
code: 'ERR_REQUIRE_ESM'
}

Node.js v17.7.1
```

See caption:

![Selection_424](https://user-images.githubusercontent.com/21089086/168880435-6d96497d-f187-4e9f-99df-f0b54a80105d.png)

The result is the same from Docker and from DDEV. The error seems to be new versions in some resources.
**Related**
* [https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)
* [https://github.com/cyrilwanner/next-optimized-images/issues/270](https://github.com/cyrilwanner/next-optimized-images/issues/270)

**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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.