首页 文章

“节点运行开发”无法正常工作,如何解决?

提问于
浏览
-2

我想运行链接到localhost:8080的"truffle serve" . But get this error message

然后我试图找到可能是松露版本的问题 . 我试过"npm run dev" . 但是this message失败了 .

我怎么解决这个问题?,请帮帮我 .

2 回答

  • 1

    将其添加到 package.jsonscripts 部分:

    "scripts": {
       "dev": "truffle serve",
       // other scripts that may already be defined here
    }
    

    这允许您通过发出 npm run dev 来执行 truffle serve .

    关于您的 fsevents is not a constructor 问题,请参阅

    https://github.com/trufflesuite/truffle/issues/463

    这表明发行

    truffle init webpack

    解决了这个问题 .

  • 0

    尝试使用命令 npm run serve

相关问题