question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'version' of undefined at Object.getScriptVersion

See original GitHub issue

🐛 Bug Report

Updated to npm version 25.5.1 but i am still getting the following error - only on a windows build server

● Test suite failed to run

TypeError: Cannot read property 'version' of undefined

  at Object.getScriptVersion (node_modules/ts-jest/dist/compiler/language-service.js:85:68)

Npm packages: jest: ts-jest: typescript: babel(optional):

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
ahnpnlcommented, Oct 19, 2020

@thehappybug there are 2 workarounds:

  • Either Use isolatedModules: true in combination with tsc --noEmit .

  • Or always run tests without cache in case of not using isolatedModules: true

  • Or just upgrade ts-jest to 26 (should work with jest 25) and disable version warning message via environment variable, see https://kulshekhar.github.io/ts-jest/user/config/#version-checking

0reactions
anku580commented, Jun 9, 2021

I faced the same issue. I was using v25.0.0 but after updating it to v26.0.0 the issue got fixed.

Thank you @ahnpnl

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'version' of undefined Vue.js - Stack ...
First, I'd search stack trace of the error to locate which file is requesting package.json . Global project search for .version should help...
Read more >
TypeError: Cannot read property 'version' of undefined : r/vuejs
out of nowhere, I tried to serve my website and I got this error: $ vue-cli-service serve --mode development --dashboard ERROR TypeError: ...
Read more >
TypeError: Cannot read property 'version' of undefined - Support
I'm getting this error every time i try to open my website within the Local application. TypeError: Cannot read property 'version' of undefined ......
Read more >
@volar/source-map | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com.
Read more >
cli/tests/lsp/did_open_notification_large.json | deno@v1.7.2
relatedInformation = ri\n ? ri.map(fromRelatedInformation)\n : undefined;\n ... specifier;\n sourceFile.version = hash;\n sourceFileCache.set(specifier, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found