[英]Truffle migrate : Invalid or unexpected token
When i run "truffle migrate" i'm getting the following error:当我运行“truffle migrate”时,出现以下错误:
var HelloWorld=artifacts.require(“HelloWorld”);
^
SyntaxError: Invalid or unexpected token
at new Script (vm.js:74:7)
at Object.createScript (vm.js:246:10)
I'm using a MacOs.我正在使用MacOs。
Any suggestions on why this problem is occuring?关于为什么会出现这个问题的任何建议?
I solved it.我解决了。 As The char “ is similar to ", i didn't see it was there so i had to replace it to the " char in order to work.由于字符“类似于”,我没有看到它在那里,所以我必须将它替换为“字符才能工作。 So i replaced:所以我更换了:
var HelloWorld=artifacts.require(“HelloWorld”);
with和
var HelloWorld=artifacts.require("HelloWorld");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.