Error: Failed to scan for dependencies from entries Vite and react

2.9k views Asked by At

I am trying to create a react app with vite and I am getting this error: Error: Failed to scan for dependencies from entries: C:/Users/User/Desktop/responsive-app/index.html The path to my project, I am using windows for this spacific project

The service is no longer running at C:\Users\User\Desktop\responsive-app\node_modules\esbuild\lib\main.js:1083:25 at sendRequest (C:\Users\User\Desktop\responsive-app\node_modules\esbuild\lib\main.js:699:14) at buildOrContextContinue (C:\Users\User\Desktop\responsive-app\node_modules\esbuild\lib\main.js:1081:5) at C:\Users\User\Desktop\responsive-app\node_modules\esbuild\lib\main.js:993:11 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I have tried different approaches like deleting node_modules and reinstalling all packages, installing esbuild manually... but the app is not statring

3

There are 3 answers

2
CEN-Smart On

To resolve the issue do this npm i -g vite these error is because vite is not installed globally on your machine.

0
Anas Ouadi On

I had the same error, and I found that one of my file names started with a #, and that caused the problem. Check the names of the files you have; it may be causing the problem.

0
Cacious On

According to this solution on GitHub issues , the issue is caused by the errors that happen and are shown below the error message mentioned here. Once you clear those outstanding errors below the 'Failed scan error', the Failed scan error will then be resolved too.

The error just means that there were errors when trying to scan the dependencies based on those entry points.

I hope this helps, it solved the problem for me.