首页 > react npm test 的失败

react npm test 的失败

return (
      <div>
        <header className="toolbar">
          <span className="toolbar__title"> Todo List  </span>
        </header>
        <main className="main">
          <span className="main__title">Todo List</span>
          <form className={containerClass} onSubmit={this.handleAddTodo}>
            <input className="main__new-todo-container__input" ref="newTodoContent" placeholder="New Todo" />
            <button className="main__new-todo-container__confirm" type="submit" dangerouslySetInnerHTML={{__html: confirmIcon}}></button>
          </form>
          <Todos todos={ this.state.todos } onTodoDelete={ TodoActions.remove } onTodoUpdate={ TodoActions.change } />
          <button className={addTodoButtonClass} onClick={this.toggleMode} dangerouslySetInnerHTML={{__html: addIcon}}></button>
        </main>
      </div>
    );

报错信息如下

zandeMacBook-Pro:todo juluad$ npm run lint

> todo@1.0.0 lint /Users/www/react/todo
> eslint ./app ./server.js


/Users/www/react/todo/app/components/App/index.js
  64:56  error  Multiple spaces found before '<'  no-multi-spaces

✖ 1 problem (1 error, 0 warnings)


npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "lint"
npm ERR! node v4.2.0
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! todo@1.0.0 lint: `eslint ./app ./server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the todo@1.0.0 lint script 'eslint ./app ./server.js'.
npm ERR! This is most likely a problem with the todo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint ./app ./server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls todo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/www/react/todo/npm-debug.log
zandeMacBook-Pro:todo juluad$ 


检查 /Users/www/react/todo/app/components/App/index.js 第 64 行,< 之前不能有多个空格。

【热门文章】
【热门文章】