-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Preset ts-jest is invalid: The "id" argument must be of type string. Received null #10035
Comments
I troubled this issue,too. |
I think this might be related to resolving the preset artifact with |
dev deps are not installed if No idea if that's the issue here (I've never used, or heard of, AWS CodeBuild). If you think this is a bug with Jest, pleas open up a new issue with full reproduction steps, following the template |
I'm getting this error as well, in local environment, with no usage of NODE_ENV being set to production. Seems specific to ts-jest, however. |
I just ran |
@Robbie-Cook not working is there something I am missing? |
I see in your command that you run I think the jest error message is a bit confusing, since it does usually not mean that the preset is invalid, but rather that the preset is not there or at all or can not be found for some reason. |
In my case, which I can't imagine will apply to anyone else, I happened to have a symlink to |
I'm testing the preset option in different local projects. module.exports = {
...
preset: 'ts-jest',
...
} Neither of the other two works: const { jsWithTs: tsjPreset } = require('ts-jest/presets');
module.exports = {
...
transform: {
...tsjPreset.transform,
// [...]
},
...
} |
If anyone is still running into this, I was able to resolve it without needing to install jest separately. I was running |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
To Reproduce
Steps to reproduce the behavior:
I use AWS CodeBuild to deploy a project and I invoke jest tests during the deployment. When the NODE_ENV is set to dev, there is no problem, but when NODE_ENV is set to production. I get the following error:
I actually do have ts-jest installed and during the deployment I install the following as dev dependencies:
I can confirm that ts-jest is installed during the deployment:
If it was not installed, I would have gotten a ts-jest error above.
However, the next line contains this:
And this when the error happens. When NODE_ENV is set to production in the container, Jest seems to ignore the dev dependencies installed. This is wrong because I don't want to put jest and ts-jest into dependencies during my production deploy.
How am i able to address the problem?
The text was updated successfully, but these errors were encountered: