chalk/chalk

Tried to use with TS (NestJS Project)

apuatcfbd opened this issue · 6 comments

I'm using it in migration so It's not in nestJS context,
When tried to use followed by the docs got following error

Could not load the seeding source config file at seeding-source.js! Orginal error was: require() of ES Module /.../node_modules/chalk/source/index.js from /.../some.seeder.js not supported.
Instead change the require of index.js in /.../some.seeder.js to a dynamic import() which is available in all CommonJS modules.
Qix- commented

Please search issues before posting questions. This has been covered extensively and this exact error message has been mentioned countless times already.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

apudiu commented

Please search issues before posting questions. This has been covered extensively and this exact error message has been mentioned countless times already.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Thank you for the response but that didn't help. I've also searched existing issues in this package. As I said, I'm on the NestJS project and using TypeScript. I've used this package exactly as shown in the docs. It's not working. what can I do?

apudiu commented

Please open the issue, I didn't find the solution yet.

Qix- commented

Then you need to open an issue with NestJS. This isn't an issue for Chalk. We can't support your NestJS project here.

apudiu commented

Then you need to open an issue with NestJS. This isn't an issue for Chalk. We can't support your NestJS project here.

Did I asked to support my NestJS project? I've many packages installed in this project that are not related to NestJS. Those are working, This package is not. I've already implemented a solution, I'm not waiting for you to support it. You do not need to be rude.

I've opened an issue here to support the project. So you can get a chance to fix your thing. If you don't like it then don't fix this. Up to you.

Qix- commented

I'm not being rude, just direct. On that note, there's nothing to "fix" here. We're an ESM package. Whatever you're doing is trying to use require(). That doesn't work. Please see the link I gave you. Chalk is doing nothing out of the ordinary here.

I wish you the best of luck with your project!