簡體   English   中英

SyntaxError: Unexpected token: operator (>)

[英]SyntaxError: Unexpected token: operator (>)

我在我的 React package 中使用react-bootstrap- typeahead 庫。

我根據文檔添加了這些導入語句:

import { Typeahead } from "react-bootstrap-typeahead";
import "react-bootstrap-typeahead/css/Typeahead.css";

和渲染:

<Typeahead
  id="basic-typeahead-example"
  onChange={this.handleChange}
  options={this.state.options}
  placeholder="Choose..."
/>

嘗試構建時,我得到:

static/js/main.4b322a5a.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./~/react-bootstrap-typeahead/~/escape-string-regexp/index.js:3,0]

當我運行 npm 時,代碼運行完美,有人能說出實際問題出在哪里。 react-bootstrap-typeahead庫有什么問題嗎?

我為這個庫安裝了較低版本並且它工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM