Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
build react router failed with error `Unexpected token (Note that you need plugins to import files that are not JavaScript)`

i just cloned the code from github,and run npm install -f

then run 'npm run build'

however,i got this error.

what happened?

> Executing task: npm run build <


> build
> rollup -c && tsc -b


packages/react-router/index.ts → build/node_modules/react-router/index.js...
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
copied:
  packages/react-router/package.json → build/node_modules/react-router/package.json
  packages/react-router/README.md → build/node_modules/react-router/README.md
  LICENSE.md → build/node_modules/react-router/LICENSE.md
(!) Circular dependency
packages/react-router/lib/hooks.tsx -> packages/react-router/lib/router.ts -> packages/react-router/lib/hooks.tsx
created build/node_modules/react-router/index.js in 400ms

packages/react-router/index.ts → build/node_modules/react-router/react-router.development.js...
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
packages/react-router/lib/hooks.tsx (328:36)
326:     invariant(
327:       parentPathnameBase === "/" ||
328:         parsedLocationArg.pathname?.startsWith(parentPathnameBase),
                                         ^
329:       `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, ` +
330:         `the location pathname must begin with the portion of the URL pathname that was ` +
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
    at error (/Users/kent/projects/react-router/node_modules/rollup/dist/shared/node-entry.js:5400:30)
    at Module.error (/Users/kent/projects/react-router/node_modules/rollup/dist/shared/node-entry.js:9824:16)
    at tryParse (/Users/kent/projects/react-router/node_modules/rollup/dist/shared/node-entry.js:9717:23)
    at Module.setSource (/Users/kent/projects/react-router/node_modules/rollup/dist/shared/node-entry.js:10080:33)
    at /Users/kent/projects/react-router/node_modules/rollup/dist/shared/node-entry.js:12366:20
    at async Promise.all (index 3)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda