illcrx
illcrx

Reputation: 814

WebStorm erroring for what appears to be no reason

image of text file

I am not sure what is going on here. I have a brand new template that someone wrote and I plug it into my editor and get these lovely red squiggly lines. I cannot see any syntax errors so I'm thinking its the editor.

The first thing I see is on the import statement. Why is there a red squiggly there? It is telling me statement expected but that is a simple import statement! There is yet another after the const serializers. I will likely miss an actual error if these stay on here. I have tried changing the language and it is telling me that it knows its a Vue Component via the V symbol on the file in the Project tab.

I'm not sure what to do here.

Upvotes: 0

Views: 38

Answers (2)

lena
lena

Reputation: 93738

I'd suggest trying the Zero Width Characters locator plugin - it helps to visualize hidden control characters that might break the syntax highlighting and code execution

Upvotes: 1

illcrx
illcrx

Reputation: 814

Wow, I took a break and came back. Tried to load the component in Vue and it fails with the error.

unexpected character ' ' 

So it was a damn space! There were a few spaces, maybe it came from the fact that I copied the code?

Upvotes: 1

Related Questions