使用Yeoman Generator时出错

问题描述 投票:0回答:1

我在这里按照教程:http://yeoman.io/codelab/index.html

在第5步,我运行npm run serve并在构建上获得以下错误:

错误在./src/app/components/TodoTextInput.js中

/Users/pro/Documents/Code/React/Yo/Tutorial/mytodo/src/app/components/TodoTextInput.js 40:13错误不必要的引用属性'编辑'发现引用 - 道具

✖1个问题(1个错误,0个警告)

当我导航到http://localhost:3000/时,它是空白的。我将很感激任何指导。

reactjs npm yeoman
1个回答
1
投票

这似乎是Fountain webapp生成器的一个已知问题。 (见their github issues

当您从TodoTextInput.js:38-42的edit属性中删除引号时,错误消息将消失。

之前:

    className={
      classnames({
        'edit': this.props.editing,
        'new-todo': this.props.newTodo
      })}

后:

    className={
      classnames({
        edit: this.props.editing,
        'new-todo': this.props.newTodo
      })}

找到答案here

© www.soinside.com 2019 - 2024. All rights reserved.