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

Error [ERR_REQUIRE_ESM]: Can't start demo project. #292

Open
RashiqAzhan opened this issue Mar 2, 2022 · 0 comments
Open

Error [ERR_REQUIRE_ESM]: Can't start demo project. #292

RashiqAzhan opened this issue Mar 2, 2022 · 0 comments

Comments

@RashiqAzhan
Copy link

Describe the bug
Chalk in utilities is no longer supported.

To Reproduce
Steps to reproduce the behavior:
Follow the documentation steps in here.

Expected behavior
The project starts normally like in the video.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Arch
  • Firefox
  • v97.0.1

Terminal Output:

.../rest-hapi-demo/node_modules/rest-hapi/utilities/log-util.js:2
const chalk = require('chalk')
^

Error [ERR_REQUIRE_ESM]: require() of ES Module .../rest-hapi-demo/node_modules/rest-hapi/node_modules/chalk/source/index.js from .../rest-hapi-demo/node_modules/rest-hapi/utilities/log-util.js not supported.
Instead change the require of index.js in .../rest-hapi-demo/node_modules/rest-hapi/utilities/log-util.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (.../rest-hapi-demo/node_modules/rest-hapi/utilities/log-util.js:2:15)
at Object.<anonymous> (.../rest-hapi-demo/node_modules/rest-hapi/rest-hapi.js:12:17)
at Object.<anonymous> (.../rest-hapi-demo/api.js:3:16) {
code: 'ERR_REQUIRE_ESM'
}
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