我克隆了我朋友在github上的回购
https://github.com/feijihn/todolist_react
使用基于node.js + react.js + material.ui
构建的Web应用程序然后我用npm安装需求:
npm i -S -d
之后我启动服务器
node server.js
并且一切都运行良好,但随后我做了一些更改并尝试打包一个新的bundle.js通过webpack它给了我这个错误:
webpack --display-detailed-errors
Hash: 396f0bfb9d565b6f60f0
Version: webpack 1.12.12
Time: 1294ms
+ 1 hidden modules
ERROR in ./public/scripts/index.jsx
Module build failed: SyntaxError: /home/ignatif/todolist_react/public/scripts/index.jsx: Unexpected token (91:3)
89 | render: function() {
90 | return (
91 | <Paper className="paperE" zDepth={5}>
| ^
92 | <AppBar
93 | title="Just To-Do. No shit"
94 | iconClassNameRight="muidocs- icovigation-expand-more"/>
at Parser.pp.raise (/home/ignatif/todolist_react/node_modules/babylon/index.js:1425:13)
at Parser.pp.unexpected (/home/ignatif/todolist_react/node_modules/babylon/index.js:2907:8)
at Parser.pp.parseExprAtom (/home/ignatif/todolist_react/node_modules/babylon/index.js:754:12)
at Parser.pp.parseExprSubscripts (/home/ignatif/todolist_react/node_modules/babylon/index.js:509:19)
at Parser.pp.parseMaybeUnary (/home/ignatif/todolist_react/node_modules/babylon/index.js:489:19)
at Parser.pp.parseExprOps (/home/ignatif/todolist_react/node_modules/babylon/index.js:420:19)
at Parser.pp.parseMaybeConditional (/home/ignatif/todolist_react/node_modules/babylon/index.js:402:19)
at Parser.pp.parseMaybeAssign (/home/ignatif/todolist_react/node_modules/babylon/index.js:365:19)
at Parser.pp.parseParenAndDistinguishExpression (/home/ignatif/todolist_react/node_modules/babylon/index.js:827:26)
at Parser.pp.parseExprAtom (/home/ignatif/todolist_react/node_modules/babylon/index.js:713:19)
at Parser.pp.parseExprSubscripts (/home/ignatif/todolist_react/node_modules/babylon/index.js:509:19)
at Parser.pp.parseMaybeUnary (/home/ignatif/todolist_react/node_modules/babylon/index.js:489:19)
at Parser.pp.parseExprOps (/home/ignatif/todolist_react/node_modules/babylon/index.js:420:19)
at Parser.pp.parseMaybeConditional (/home/ignatif/todolist_react/node_modules/babylon/index.js:402:19)
at Parser.pp.parseMaybeAssign (/home/ignatif/todolist_react/node_modules/babylon/index.js:365:19)
at Parser.pp.parseExpression (/home/ignatif/todolist_react/node_modules/babylon/index.js:329:19)
at Parser.pp.parseReturnStatement (/home/ignatif/todolist_react/node_modules/babylon/index.js:2106:26)
at Parser.pp.parseStatement (/home/ignatif/todolist_react/node_modules/babylon/index.js:1894:19)
at Parser.pp.parseBlockBody (/home/ignatif/todolist_react/node_modules/babylon/index.js:2294:21)
at Parser.pp.parseBlock (/home/ignatif/todolist_react/node_modules/babylon/index.js:2275:8)
at Parser.pp.parseFunctionBody (/home/ignatif/todolist_react/node_modules/babylon/index.js:1130:22)
at Parser.pp.parseFunction (/home/ignatif/todolist_react/node_modules/babylon/index.js:2406:8)
at Parser.pp.parseFunctionExpression (/home/ignatif/todolist_react/node_modules/babylon/index.js:764:17)
at Parser.pp.parseExprAtom (/home/ignatif/todolist_react/node_modules/babylon/index.js:726:19)
at Parser.pp.parseExprSubscripts (/home/ignatif/todolist_react/node_modules/babylon/index.js:509:19)
at Parser.pp.parseMaybeUnary (/home/ignatif/todolist_react/node_modules/babylon/index.js:489:19)
at Parser.pp.parseExprOps (/home/ignatif/todolist_react/node_modules/babylon/index.js:420:19)
at Parser.pp.parseMaybeConditional (/home/ignatif/todolist_react/node_modules/babylon/index.js:402:19)
at Parser.pp.parseMaybeAssign (/home/ignatif/todolist_react/node_modules/babylon/index.js:365:19)
at Parser.pp.parseObjPropValue (/home/ignatif/todolist_react/node_modules /babylon/index.js:1021:99)
我安装了材料ui,我自己也找不到任何依赖问题。 我朋友的网络包很好地包装了一切,并没有给出任何错误。是什么导致这个?
答案 0 :(得分:0)
如果您输入以下内容,则您提供的仓库将起作用:
npm install
webpack
node server.js