渲染方法中意外的标记参数

我试图启动Express.js服务器与我下载的反应的应用程序,但是当我做npm开始在我的服务器上有错误

ERROR in ./src/app.jsx Module build failed: SyntaxError: Unexpected token (6:7) 4 | import 'react-select/dist/react-select.css'; 5 | > 6 | render(<div>Place your application here</div>, document.getElementById('app-root')); 

为什么会这样?

尝试使用这个

 import React from 'react'; import ReactDOM from 'react-dom'; import 'react-select/dist/react-select.css'; ReactDOM.render( < div > Place your application here < /div>, document.getElementById('root')); 

最后得到它在webpack.config中的设置预置工作: presets:['es2015','react'] – 对于错误Uncaught SyntaxError: Unexpected token importnpm install babel-preset-react + babel-preset-es2015