-
Notifications
You must be signed in to change notification settings - Fork 3
JS file error: Unexpected token < #176
Comments
We are considering removing JS sniffing all-together as JS files can cause a memory exhaustion (especially if they are minified). I'll try to look more in depth about this, can you just link your theme so that I can test? |
Hi Of course, my theme is free, you can download it from here https://github.com/LovageIO/lovage Thanks |
Hi - my theme is getting this same error for every javascript file, and I have quite a few of them. I have split my js out into separate files that then get concatenated by gulp. My theme is here, you're welcome to test it: https://github.com/BinaryMoon/jarvis |
Hello @LovageIO I have the same issue. @dingo-d if you want to see it in action, you can download my theme from here : https://github.com/vbaimas/fashionclaire |
Just my input that I am experiencing this issue as well with the ERROR: Unexpected token <, line 1 |
Just a small note: as is mentioned in the review handbook, Theme Sniffer is just a tool to help with the review process, not a requirement. It's a work in process, and if anybody would like to contribute I'd welcome the help 🙂 |
Just saw this: https://snyk.io/test/ |
I think snyk just tests the dependency vulnerabilities (in npm packages). |
@BinaryMoon I hope you won't try to submit your theme with the docs in them. I tried to use the sniffer and I got memory timeout, not 100% sure if it's due to the docs but my PhpStorm froze when it tried to index all the files 😄 I'm trying to work out where the memory exhaustion comes from, still hadn't nailed it fully. |
@dingo-d I don't plan to bundle the docs with the theme :) If you were to install everything (npm install) then Surprised PHPStorm froze. I use VSCode and have an entire WordPress install, and all of my commercial themes, a bunch of free themes, and about 30 plugins all in a single project. I know PHP Storm is well used so I would have imagined it could do similar. |
I had 5 opened PhpStorm windows and I think that the indexing killed it. |
HI @BinaryMoon I am just working on the sniffer (removing JS checks) and so I tested your theme, and it killed the sniffer again. So I went to look at it and the tests folder killed it xD The But this is great, as I'll now add tests to excluded folder list 😄 |
@dingo-d Ha haa - I can see how that would be a problem. That file didn't exist when I first ran into this problem :) |
I've also excluded JS sniffing for now. Will put this back at a later date 🙂 |
Hi
I found all the js files in my theme includes ERROR: Unexpected token <, line 1. Even I delete all codes and only leave an empty file.
Does anyone have the same issue?
The text was updated successfully, but these errors were encountered: