Skip to content

Conversation

LeaderOnePro
Copy link
Contributor

When I ran this project in the Windows environment, I encountered an error "Failed to resolve import '@/components/WelcomeScreen' from'src/App.tsx'. Does the file exist?". So I modified the path alias configuration in the frontend/vite.config.ts file. The new configuration uses fileURLToPath and path.dirname to more reliably resolve paths relative to the current file.

Copy link

google-cla bot commented Jun 3, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@nodew
Copy link

nodew commented Jun 4, 2025

I think __dirname is much simpler than the fileURLToPath solution. Consider

...
alias: {
      "@": path.resolve(__dirname, "./src"),
},
...

@LeaderOnePro
Copy link
Contributor Author

Thanks for your great suggestion! I think this __dirname approach is indeed simpler and more straightforward. I've adopted this solution and updated the code accordingly.

Copy link
Contributor

@philschmid philschmid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you guys!

@philschmid philschmid merged commit 972392d into google-gemini:main Jun 18, 2025
1 check passed
rock913 pushed a commit to AutoBrainLab/gemini-fullstack-langgraph-quickstart that referenced this pull request Oct 11, 2025
Update the Vite configuration and correct the path resolution to support file URLs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants