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.

Probably all versions above `1.6.4` are not working with `preserveSymlinks` tsconfig option

See original GitHub issue

Hey, this is a cool library I really like the idea of inferring TS types from JSON schemas 👌🏻

Almost all the solutions I found are focused on generating types (via CLIs or code), this library is different & unique.

I found something interesting, all the recent versions (above 1.6.4) of this library are not working for me, I’m pretty sure my config is correct I’m using Typescript v4 and strict mode is enabled.

This is what I receive, the inferring is not working 😕 Used the example in the Readme.

The interesting part is this, it looks like 1.6.4 is the most used version in the last week, so I test it and it’s working perfectly!

Can anyone please confirm that versions above 1.6.4 work? or at least the recent one 2.5.5? Maybe I have something wrong on my side, thanks.

This is my config:

  • node v16.16.0
  • Typescript v4.7.4

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bayoudhicommented, Sep 1, 2022

Hi @ThomasAribart, thanks for the reply. I’m sorry for the late response.

To be honest, I’m still not sure what preserveSymlinks is used for 😅 it’s a monorepo project where some code is shared between different projects/services.

I have a monorepo project with multiple tsconfig files and modules, and I’m pretty sure preserveSymlinks is required, I need to check that.

Yep, preserveSymlinks is required in my case

I figured out that preserveSymlinks is not required in my project, and the error I received 3 days ago after disabling preserveSymlinks is not related to this option (I already fixed it) so I can use this library now without any issues 🎉

Thanks again for the fast replies and help 🙂

I’m going to close this issue.

1reaction
ThomasAribartcommented, Aug 29, 2022

Nice catch, thanks ! I’ll have a look ! The least I can do is add it as a requirement in the docs.

For what reason do you use preserveSymlinks options ? Sharing code across services ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TSConfig Option: preserveSymlinks - TypeScript
All the configuration options for a project. Classes. How to provide types to JavaScript ES6 classes. Made with ♥ in Redmond, Boston, SF...
Read more >
Problem with ng serve --preserve-symlinks Angular/CLI 6.0.0
Observed behavior. Return error "Unknown option: '--preserveSymlinks'", was removed? Desired behavior. Angular compile with symbolic link ...
Read more >
Preserve Symlinks in Angular Libraries - Stack Overflow
I believe you need to add the preserveSymlinks option in the angular.json located at the project that will consume your library.
Read more >
Keysight KCOS 9.30 Third Party & Open-Source License ...
All rights reserved. @babel/helper-validator-identifier 7.18.6 : MIT License. @babel/helper-validator-option 7.16.7 : MIT License.
Read more >
https://www.teradici.com/docs/default-source/licen...
"Derivative Works" shall mean any work, whether in Source or Object form, ... under the terms of version 1.1 or earlier of the...
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