-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Googleapis return "Module not found: can't resolve fs" when running a project #3174
Comments
Hi @Geccles, could you provide the code you are attempting to run? Thanks in advance. |
This is my function and then I just call it in another file. Let me know if there's anything else you may need.
|
any updates on this |
The error you're seeing is common when trying to use certain Node.js modules, such as fs (file system), on the client side of a JavaScript application. This is because these modules are designed to be used in the Node.js environment on the server, not in the browser. In your case, it appears that you're trying to use the googleapis module on the client side of your application. This module relies on other Node.js modules, such as fs, which are not available in the browser. To fix this issue, you should move any code that uses googleapis to the server side of your application. |
For me i removed "use client" where i call it on page.tsx and it works. Because my issue, what to call signout() function on page.tsx of nextAuth with google and when i remove there was not issue all works fine |
This has been closed since a request for information has not been answered for 15 days. It can be reopened when the requested information is provided. |
You have to set some environment variable. I found out after i deleleted it a google-related env variable and got the error. The bad news is that i dont know it since git wasnt tracking my the .env. |
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is this a client library issue or a product issue?
This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.
Did someone already solve this?
Please create an issue in the support console to ensure a timely response.
If the support paths suggested above still do not result in a resolution, please provide the following details.
Environment details
googleapis
version: 112.0.0Steps to reproduce
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: