Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
index.tsx in package react-router has 152 problems

Everything seems to work fine, I just see those errors. Is this normal? How can i fix this. My react application is written in Javascript, not in Typescript, but I do not think that this should matter, should it?

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I've just restarted Visual Studio Code and the errors disappeared.

For context, I had Visual Studio running for some days now, so I can see how this could lead to some bugs.

about 4 years ago · Juan Pablo Isaza Report

0

Are you using a package manager like npm/yarn/pnpm for installing react-router? Looking at that pathname it kinda looks like you're not and you should be.

If you're trying to import the index.tsx file directly in your JavaScript it won't work, you'll need the transpiled version which would be available automatically by installing it through a package manager (something like npm install react-router). The plain js files would then be available under node_modules/react-router in the root directory of your project.

To import it somewhere in a React project you could then use:

import { Route } from 'react-router'

(no need for the full path name including node_modules - more info on npm install here: https://docs.npmjs.com/cli/v6/commands/npm-install)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!