-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
TypeError: file.has is not a function #2
Comments
I forked the repo to publish a temporary fix: |
@jonschlinkert I'll publish it as a PR tomorrow. |
@rbecheras thanks! A PR would be great. Also, if you need to show that message in red, use ansi-colors or ansi-red directly. |
@doowb ok for But this error is weird. See the logged file: <File "src/assets/img/brand.png" <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 e9 00 00 00 51 08 06 00 00 01 40 a9 b1 6d 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 ... >> } It seems a vinyl file, it has got a Also it seems that the I have to mention another important thing, probably the more important one. I have to make it really clear but it seems that the parsed files resulting in that error are files that doesn't have a front matter: assets like binary files or other templates without frontmatter. Probably the best fix would be in the front matter middeware to completely pass on files that it doesnt matter ;-). But it rest to find in code where the vinyl object misteriously loose its prototype... However, a such Type checking in the |
That's because it's an instance of a However, it seems like the error you're having is that
The
I think that the |
Wow, I don't know where I loosed my head to confound the class and the instance... The fact that the methods are missing probably helped... Ok. I'll fix the PR later. (I have no longer battery now!) |
Got a
TypeError
parsing some filesThe error is thrown here: https://github.com/jonschlinkert/common-middleware/blob/master/index.js#L115
Here is a quick fix that solve the issue but we have to know why it happens. I don't know that for now.
The text was updated successfully, but these errors were encountered: