-
Notifications
You must be signed in to change notification settings - Fork 285
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
"Invalid or unexpected token" at single quotation mark #2204
Comments
you are likely using an older node.js version, whereby it doesn't recognize the when you type to install a newer version of node.js on a non-windows machine, I recommend NVM. |
on this note @bnoordhuis it would be kinda neat to display the node.js version in all node.js stacktraces, at the end. think about how much time this would save users debugging etc, and on online messsage boards. |
I have Version 10.16.3 |
That version should support It is possible that the quotes you have are not Could you try replacing the quotes (eg rewriting them or replacing with double quotes) to see whether that resolves the issue? The quotes on all the lines look they are |
@bruce-one is right, you are using some fancy unicode quote characters instead of "normal" single-quotes. If you replace them, it should work. |
I am having this same error, but it only occurs when splitting a string into multiple lines. When the string is in one line the error goes away. Error example:
Correct example:
This is using nodejs v12.13.1 |
@han-so1omon That's intentional. If you want line feeds, use the
|
I have a problem getting this to work file name : index.js
but when I type
node index.js
, this is what I get....The text was updated successfully, but these errors were encountered: