Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help me, error with react-router in the label <Route> #380

Open
maicolffsa opened this issue Jan 13, 2021 · 0 comments
Open

help me, error with react-router in the label <Route> #380

maicolffsa opened this issue Jan 13, 2021 · 0 comments

Comments

@maicolffsa
Copy link

maicolffsa commented Jan 13, 2021

SyntaxError: /workspace/cloudboost/accounts-ui/app/routes.js: Unexpected token (29:4)

27 | const routes = (
 28 | 
> 29 |   <Route>
    |     ^
 30 |         <Route path="/" component={Layout}>
 31 |             <IndexRoute component={Login} />
 32 |             <Route path="login" component={Login} />
    at Parser.pp$5.raise (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:4454:13)
    at Parser.pp.unexpected (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:1761:8)
    at Parser.pp$3.parseExprAtom (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3750:12)
    at Parser.pp$3.parseExprSubscripts (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3494:19)
    at Parser.pp$3.parseMaybeUnary (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3474:19)
    at Parser.pp$3.parseExprOps (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3404:19)
    at Parser.pp$3.parseMaybeConditional (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3381:19)
    at Parser.pp$3.parseMaybeAssign (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3344:19)
    at Parser.pp$3.parseParenAndDistinguishExpression (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3828:26)
    at Parser.pp$3.parseExprAtom (/workspace/cloudboost/accounts-ui/node_modules/babel-core/node_modules/babylon/lib/index.js:3709:19) {
  pos: 738,
  loc: Position { line: 29, column: 4 },
  _babel: true,
  codeFrame: '\u001b[0m \u001b[90m 27 | \u001b[39m\u001b[36mconst\u001b[39m routes \u001b[33m=\u001b[39m (\n' +
    ' \u001b[90m 28 | \u001b[39m\n' +
    '\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 29 | \u001b[39m    \u001b[33m<\u001b[39m\u001b[33mRoute\u001b[39m\u001b[33m>\u001b[39m\n' +
    ' \u001b[90m    | \u001b[39m    \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n' +
    ' \u001b[90m 30 | \u001b[39m        \u001b[33m<\u001b[39m\u001b[33mRoute\u001b[39m path\u001b[33m=\u001b[39m\u001b[32m"/"\u001b[39m component\u001b[33m=\u001b[39m{\u001b[33mLayout\u001b[39m}\u001b[33m>\u001b[39m\n' +
    ' \u001b[90m 31 | \u001b[39m            \u001b[33m<\u001b[39m\u001b[33mIndexRoute\u001b[39m component\u001b[33m=\u001b[39m{\u001b[33mLogin\u001b[39m} \u001b[33m/\u001b[39m\u001b[33m>\u001b[39m\n' +
    ' \u001b[90m 32 | \u001b[39m            \u001b[33m<\u001b[39m\u001b[33mRoute\u001b[39m path\u001b[33m=\u001b[39m\u001b[32m"login"\u001b[39m component\u001b[33m=\u001b[39m{\u001b[33mLogin\u001b[39m} \u001b[33m/\u001b[39m\u001b[33m>\u001b[39m\u001b[0m'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitpod/.npm/_logs/2021-01-13T13_37_04_048Z-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant