I am testing a contract, when I run the truffle migrate command, in my deplyment contract located in the migrations folder the following error appears:

var HelloWorld=artifacts.require (“./HelloWorld.sol”);

SyntaxError: Invalid or unexpected token

I am using solidty 0.5.0, What is wrong with the syntax of the .js file.

  • 1
    You have to use the symbol " (Unicode Quotation Mark U+0022) to delimit strings in javascript. Others symbols like (Left Double Quotation Mark U+201C) nor (Right Double Quotation Mark U+201D) are not accepted (yet). It is common in some pages to replace " by the later symbols because they look nicer on screen, but unfortunately that will not work for source code and it will break copy+paste examples.
    – Ismael
    Apr 20, 2019 at 15:00

1 Answer 1


You are using invalid quotation marks. You have to use "...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.