I have the following error:
Module build failed (from ./node_modules/ts-loader/index.js): Error: Debug Failure. False expression: Non-string value passed to
ts.resolveTypeReferenceDirective
, likely by a wrapping package working with an outdatedresolveTypeReferenceDirectives
signature. This is probably not a problem in TS itself. ...
@ multi babel-polyfill react-hot-loader/patch ./src/index.tsx
At this point I've been trying everything:
- updating ts-node
- updating typescript
- updating ts-loader
- updating configuration of babel and webpack
And still, nothing seems to solve this issue.
At this point, I think it's not strictly related to the TS, but more likely with react-hot-loader configuration/usage, but I'm not sure. Here are my packages versions:
"react-hot-loader": "^4.5.3",
"ts-jest": "^27.1.4",
"ts-node": "^10.8.1",
"ts-node-dev": "^2.0.0",
"typescript": "^4.7.4",
And webpack config for TS and react-hot-loader:
module.exports = {
entry: ['babel-polyfill', 'react-hot-loader/patch', './src/index.tsx'],
[...]
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.(ts|tsx)?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
If someone could give me some hints on what to look for now, or what can be wrong, I would appreciate it. Thanks in advance!