New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ENOENT: no such file or directory #1291
Comments
Hi @SebastianPetric, Thanks for reaching out. Could you please indicate the steps you have taken to install tldts as well as a small script that I could use to reproduce this issue on my end? It would be very useful. From what I can see in the error it could also be an issue with the bundling or the way the project runs, but I would need more specific steps to reproduce the issue. Thanks, |
We get a lot of those warnings when building our create-react-app with react-scripts 5. While the source maps to all of tldts' files can be found, the original source can not, as its not part of the npm package. a) including the original source code as files in the npm package or or whether react-scripts should silence the warning or something. (See discussion thread facebook/create-react-app#11767) |
Thanks for all the details @iStefo, I tried locally and including the source in the npm package does not increase significantly the size of the compressed archive so we could do that. Would it be enough to add the |
Thanks for your response. So I would suggest you simply include the source in the distributed package if that's no hassle for you. It may help out all the create-react-app users out there using this package :) |
https://github.com/remusao/tldts/releases/tag/v5.7.86 contains the sources, let me know if this solves the issues you encountered so far. |
Hi @remusao, it fixed all errors except for the following two:
So its probably just that you missed those two files as they are not in |
Indeed. Sorry about that, I will push another update to address this issue. |
Hey, I get following error and more of the same type, when trying to call the parse() method:
WARNING in ./node_modules/tldts-core/dist/es6/src/is-valid.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from '/Users/sepe/IdeaProjects/my-project/node_modules/tldts-core/src/is-valid.ts' file: Error: ENOENT: no such file or directory, open '/Users/sepe/IdeaProjects/my-project/node_modules/tldts-core/src/is-valid.ts'
It also fails to find suffix-trie.ts, trie.ts, index.ts, subdomain.ts,...
I am using version 5.7.67 but it also accurs with older versions. We are using a react 17 project, with node 16 and typescript 4.5.5. In node_modules the packages tldts and tlds-core do exist...Do you have an idea what the problem could be in this case?
The text was updated successfully, but these errors were encountered: