-
Notifications
You must be signed in to change notification settings - Fork 928
'The requested module '@grpc/grpc-js' is expected to be of type CommonJS' Getting issue while deploying next js application by gcp CICD pipeline. #5983
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
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @krishna-fenixwork, thanks for reaching out. Would you mind sharing more specific details:
|
@hsubox76 Christina - should we fix our imports? |
Looking around, it seems like if we aren't able to change grpc-js then we should probably follow the pattern given in the error message. |
Hey, @jbalidiong These are the packages that I'm using -
I've also tried to upgrade them to their latest version but the issue still persists so I downgrade them again to these versions. I've my firebase configuration file where I initialized firebase and firestore like this -
and then I imported this db and storage to my required components.
These imports are defined in my 3 component files in which I just used its functions for my required functionality. And as I said, I'm just using this command to deploy my function.
this is the function defination for nextServer function -
|
I will update our imports. |
Hey, @schmidt-sebastian, Is this issue fixed? I've updated the firebase package and using the latest version, but still getting the issue. If this is fixed, can you share how can I use firestore now? |
Are you seeing the same error in 9.6.7? I looked at that file in a fresh 9.6.7 install and the line from your original error:
isn't there anymore. If you're getting a new error, can you share it? If it's the same error, perhaps you need to clean out node_modules and do a fresh install? If you still see that line in node_modules/@firebase/firestore/dist/index.node.mjs you don't have the latest version somehow. |
Hey, I'm building the next js application. Recently, while deploying my project through the GCP CICD pipeline, I'm getting this error -
`
info - Checking validity of types...
warn - No ESLint configuration detected. Run next lint to begin setup
info - Creating an optimized production build...
info - Compiled successfully
info - Collecting page data...
I couldn't understand what causing the issue. I tried downgrading the version of firebase and firebase-functions too, but It didn't seem to work. Can anyone help me with that?
The text was updated successfully, but these errors were encountered: