-
-
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
TypeError: Cannot read property 'bind' of undefined #11720
Comments
Hi @hansiemithun, It would be helpful if you could provide either a repl.it demo or a minimal repository on GitHub that demonstrates the issue. See https://stackoverflow.com/help/minimal-reproducible-example for information on how to create good reproductions. |
This is the similar issue i am talking about and it looks like regression which i can also confirm: #10591. |
The thread says it has got fix here: https://github.com/facebook/jest/releases/tag/v26.5.1. But this version is unavailable from: https://www.npmjs.com/package/jest-runtime/v/26.5.2 |
Please help us help you, by providing a minimal reproduction that demonstrates the problem in the simplest way possible. Otherwise it's hard for us to test it and understand what the issue might be. =) So far you have only provided some configs, which do not tell us that much. If you are not sure what a minimal reproduction is or how to make it, the stackoverflow link I posted above is a great resource. |
Sure definitely ill provide a reproducible link, meanwhile if i can at-least hear how to download https://github.com/facebook/jest/releases/tag/v26.5.1 would be of great help as its not published. When i try to install via command line: npm i https://github.com/facebook/jest/tarball/v26.5.1 -D, it says npm ERR! Can't install https://github.com/facebook/jest/tarball/v26.5.1: Missing package name. Because this particular version has the conditional check on the setGlobalsForRuntime and that is what i need. I am still not sure about the root cause for this, but this can unblock us. |
Thank you. :-) It looks like that particular tag was just a test and never released, so it is missing the package name and various other things from the package.json. Probably your best bet would be to download it to a local folder, fix that (add the name and version properties) and use But we cannot determine if it is a regression before you can demonstrate that there is a bug in the current version. So if I were you, I would first focus on creating a reproduction showing the error with a minimal setup/configuration. Because that process will also help you narrow down the cause. |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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:
Dependencies
"jest": "^27.0.6",
"ts-jest": "^27.0.4",
Jest configuration
"jest": {
"runner": "@jest-runner/electron",
"testEnvironment": "@jest-runner/electron/environment",
"moduleNameMapper": {
"\.(jpg|jpeg|png|gif|svg|yaml)$": "/mocks/fileMock.js",
"\.(css|less|scss)$": "/mocks/styleMock.js"
},
"modulePaths": [
"/src/",
"node_modules"
],
"preset": "ts-jest",
"transform": {
"^.+\.(ts|tsx)?$": "ts-jest",
"^.+\.(js|jsx)$": "babel-jest"
}
},
Babelrc
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"],
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }],["@babel/plugin-proposal-class-properties", { "loose": true }]]
}
Expected behavior
The jest looks broken with latest upgrades and there is no proper fix on a particular issue. Every fix leading to one more bug open.
So far these many errors have been identified.
process
function. Outdated docs on webpack integration #2675Link to repl or repo (highly encouraged)
envinfo
**Node version: **
v12.17.0
**NPM version: **
6.14.4
runtime.setGlobalsForRuntime
is undefined hencebind
is also undefined. Should we setsetGlobalsForRuntime
or is this because of some missing config?The text was updated successfully, but these errors were encountered: