fork-ts-checker-webpack-plugin: Cannot read property 'length' of undefined error
Current behavior
After installing fork-ts-checker-webpack-plugin builds start failing, we get a runtime error:
ERROR in [internal] INTERNAL ERROR: Cannot read property ‘length’ of undefined stack trace: TypeError: Cannot read property ‘length’ of undefined at unescapeLeadingUnderscores
stack trace:
TypeError: Cannot read property 'length' of undefined
at unescapeLeadingUnderscores (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:13568:19)
at Object.idText (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:13572:16)
at typeToTypeNodeHelper (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35285:57)
at addPropertyToElementList (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35679:59)
at createTypeNodesFromResolvedType (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35629:25)
at createTypeNodeFromObjectType (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35459:35)
at createAnonymousTypeNode (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35411:42)
at typeToTypeNodeHelper (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35319:28)
at C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35113:106
at withContext (C:\Users\mforman\Development\Specs\node_modules\typescript\lib\typescript.js:35154:37)
Expected behavior
Successful build
Steps to reproduce the issue
On webpack.config.js:
const ForkTsCheckerWebpackPlugin = require(‘fork-ts-checker-webpack-plugin’) plugins: [ //other code new ForkTsCheckerWebpackPlugin(), ],
then - npm run build results the above error.
Environment
- fork-ts-checker-webpack-plugin: 1.4.0
- typescript: 3.6.3
- tslint: N/A
- webpack: 4.39.3
- os: all
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (6 by maintainers)
@mforman1 Could you please share what triggered this issue and what was your solution? I would really appreciate your help. Cheers. 😃
@phryneas Thank you for your assistance, thanks to your comments I was able to figure out what triggers the issue. Thanks so much!