Skip to content
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: toString failed #100

Closed
harshjv opened this issue Feb 21, 2016 · 22 comments
Closed

Error: toString failed #100

harshjv opened this issue Feb 21, 2016 · 22 comments
Labels

Comments

@harshjv
Copy link

harshjv commented Feb 21, 2016

Error: toString failed when used with node v4.3.1

$ depcheck

buffer.js:388
    throw new Error('toString failed');
    ^

Error: toString failed
    at Buffer.toString (buffer.js:388:11)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:378:21)
@lijunle
Copy link
Member

lijunle commented Feb 21, 2016

Strange, how about depcheck --json?

@harshjv
Copy link
Author

harshjv commented Feb 21, 2016

Same error with depcheck --json

@lijunle
Copy link
Member

lijunle commented Feb 21, 2016

It sems related to node.js: nodejs/node#2767

Are there large files in your project?

@lijunle lijunle added the bug label Feb 22, 2016
@lijunle
Copy link
Member

lijunle commented Feb 25, 2016

@harshjv do you have any update on this issue? I am going to close this issue if you have no reply in 1 day.

@veob
Copy link

veob commented Feb 26, 2016

I'm having the same issue.
Node's version: v4.4.1

@lijunle
Copy link
Member

lijunle commented Feb 26, 2016

@veob do you have a large file in your project?

@veob
Copy link

veob commented Feb 26, 2016

@lijunle
Large .js file? I don't think so. I have some .bson, .json files that might be large, but not .js.
Btw, before crashing depcheck runs for, like, 3-5 minutes.
Maybe it is my project that too large?

@lijunle
Copy link
Member

lijunle commented Feb 26, 2016

Depcheck not only read for .js file - it may read JSON files. How large is your JSON file?

@veob
Copy link

veob commented Feb 26, 2016

@lijunle
Nothing larger than 1 Mb.

@lijunle
Copy link
Member

lijunle commented Feb 26, 2016

OK, let me assume that 1M in this case.

Besides, how many files under your project folder?

@veob
Copy link

veob commented Feb 26, 2016

~1400 .js files (excluding node_modules/ obviously)

@veob
Copy link

veob commented Feb 26, 2016

Hm. I've just ran depcheck in project with ~300 .js files and everything is OK.

@lijunle
Copy link
Member

lijunle commented Feb 26, 2016

@veob thanks for your information. I will test offline tonight and revisit here later.

@lijunle lijunle added this to the backlog milestone Feb 27, 2016
@lijunle
Copy link
Member

lijunle commented Mar 4, 2016

@veob Sorry that I tried different ways, however cannot repro this issue.

Are you still getting this exception? Could you provide more information?

  • Node version
  • NPM version
  • OS

@veob
Copy link

veob commented Mar 9, 2016

node version: 4.1.1
npm version: 2.14.4
OS: Ubuntu 14.04.4 LTS

Just so you know, It's not critical for me to check dependencies for this particular project and if you wouldn't be able to reproduce and fix this issue, for me personaly it's okay. Don't about other people though.

@jmealo
Copy link

jmealo commented Mar 13, 2016

@lijunle I'm having the same issue. I do use ES6/harmony features and generators (koa app). I'm not sure if this impacts anything.

node version: 4.3.1
npm version: 2.14.12
OS: OSX 10.11.3

@lijunle
Copy link
Member

lijunle commented Mar 14, 2016

I am considering it is caused by binary files (either custom binary file or node.js addons). I am not having time to verify it. Could you please help to verify it? Great thanks.

@jmealo
Copy link

jmealo commented Mar 15, 2016

@lijunle I'm not sure what you mean. I checked and the biggest JSON file that I had was 1.3MB. I removed that file and still no luck.

@lijunle
Copy link
Member

lijunle commented Mar 15, 2016

@jmealo do you have binary files in your project folder? If yes, could you please remove them and re-run depcheck?

@lijunle
Copy link
Member

lijunle commented Jun 19, 2016

Hey, everybody here. After release v0.6.3 to npm-check, I don't get similar issues. Does anybody still getting this issue (with newest node.js)?

@SergeyKorochansky
Copy link

@lijunle I have this issue with v0.6.3

@lijunle lijunle removed this from the backlog milestone Nov 29, 2016
nigelzor pushed a commit to nigelzor/depcheck that referenced this issue Jan 23, 2018
@mnkhouri
Copy link
Member

I'm closing this issue due to no activity in 2 years. Please feel free to open a new issue if this issue is seen again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants