Thursday, April 13, 2023

[Solved] Failed to load plugin '@typescript-eslint' problem while running a React app

 If you have ever run into this problem while working on a react project, and it seems to be working for others in your team, 

Error message: 


Failed to load plugin '@typescript-eslint' declared in '.eslintrc » eslint-config-react-app#overrides[0]': Cannot find module 'typescript'
Or 
Failed to compile.

[eslint] Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module './Base'

then after trying out multiple solution and scouring different forums, I found out that simply running this on the command prompt in the project folder did the trick for me.

D:\ParagDemos\ClientPaymentDemoApp\ClientApp>npm install typescript-eslint

up to date in 7s

247 packages are looking for funding
  run `npm fund` for details
D:\ParagDemos\ClientPaymentDemoApp\ClientApp>

And it did not even change the package.json for me. 




Interview Question Preperation : Find longest subarray whose sum is equal to K

Software Engineering Practice interview question Given a array of N elements. Find the length of Longest Subarray whose sum is equal to give...