-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
@nestjs/cli inquirer dependency requires ESM support #12102
Comments
looks like your package manager's lock file is broken because it has After |
Not work for me for a deployment on Heroku "engines": {
"node": "16.17",
"yarn": "1.22.19
} And Add engine node & yarn version as local
rm yarn.lock && yarn install
push to git (git deployment method selected) Not working.. Error on /tmp/build_ccf76b34/node_modules/inquirer/lib/utils/screen-manager.js:8
var stripAnsi = require('strip-ansi');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /tmp/build_ccf76b34/node_modules/strip-ansi/index.js from /tmp/build_ccf76b34/node_modules/inquirer/lib/utils/screen-manager.js not supported.
Instead change the require of index.js in /tmp/build_ccf76b34/node_modules/inquirer/lib/utils/screen-manager.js to a dynamic import() which is available in all CommonJS modules. |
That worked for me, try removing the node_modules directory and yarn.lock, then install modules again. Share a replicable repo if error persists. |
Already tried :/ |
Try cloning and install dependencies in a clean docker context. |
My two cents here, upgrading to yarn 3 worked for me! |
@micalevisk Can you explain it to me? |
Is there an existing issue for this?
I found an error related with GraphQL module, that's not the same case.
Current behavior
When I try to start my application this error occures, I tried updating @nestjs/cli, node version, setting my package as module but it doesn't work.
Minimum reproduction code
https://github.com/fdorantesm/nestjs-mongodb-hexagonal-template/
Steps to reproduce
$ yarn
$ yarn start:dev
Expected behavior
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/cli
NestJS version
9.4.2
Packages versions
Node.js version
16.16.0
In which operating systems have you tested?
Other
Using MacOS Ventura 13.4.1 (c) (22F770820d)
The text was updated successfully, but these errors were encountered: