close

[Solved] Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective

While Running Simple TypeScript Project I am faced Error: Debug Failure. False expression: Non-string value passed to ts.resolveTypeReferenceDirective, likely by a wrapping package working with an outdated resolveTypeReferenceDirectives signature. This is probably not a problem in TS itself in TypeScript. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective Occurs?

While Running Simple TypeScript Project I am faced.

Error: Debug Failure. False expression: Non-string value passed to ts.resolveTypeReferenceDirective, likely by a wrapping package working with an outdated resolveTypeReferenceDirectives signature. This is probably not a problem in TS itself

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective?

  1. How To Solve Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective?

    To Solve Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective In Your Package.json file There is ts-node-dev packages in your dependencies so Just need to update this package and your error will be solved. Just follow this step. First of all Open Your package.json file. Under dependencies, you can see there is ts-node-dev dependence present. Just Update its version to the very latest one 2.0.0-0. Then run npm install to get all packages. And Now, Your error may be solved. Thanks.

  2. Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective

    To Solve Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective This error may occur Because of using an older version of packages In some cases it is the typescript package itself that is responsible for this error in this scenario Just update typescript in your package.json file. First of all Open Your package.json file. Under dependencies, you can see there is typescript dependence present. Just Update its version to the very latest one 4.7.2. Then run npm install to get all packages. And Now, Your error may be solved. Thanks.

Solution 1: typescript version

This error may occur Because of using an older version of packages In some cases it is the typescript package itself that is responsible for this error in this scenario Just update typescript in your package.json file.

  1. First of all Open Your package.json file.
  2. Under dependencies, you can see there is typescript dependence present.
  3. Just Update its version to the very latest one 4.7.2.
  4. Then run npm install to get all packages.
  5. And Now, Your error may be solved.
  6. Thanks.

Solution 2: Update ts-node-dev

In Your Package.json file There is ts-node-dev packages in your dependencies so Just need to update this package and your error will be solved. Just follow this step.

  • First of all Open Your package.json file.
  • Under dependencies, you can see there is ts-node-dev dependence present.
  • Just Update its version to the very latest one 2.0.0-0.
  • Then run npm install to get all packages.
  • And Now, Your error may be solved.
  • Thanks.

Conclusion

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

6 thoughts on “[Solved] Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective”

Leave a Comment