Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run bayesimpact/react-base:latest #4200

Open
davidjguru opened this issue May 17, 2022 · 0 comments
Open

Unable to run bayesimpact/react-base:latest #4200

davidjguru opened this issue May 17, 2022 · 0 comments

Comments

@davidjguru
Copy link
Contributor

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:

> [email protected] 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant