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)