Skip to content
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

Error: Cannot find module 'combined-stream #994

Open
juztinlazaro opened this issue Jun 15, 2023 · 5 comments
Open

Error: Cannot find module 'combined-stream #994

juztinlazaro opened this issue Jun 15, 2023 · 5 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@juztinlazaro
Copy link

juztinlazaro commented Jun 15, 2023

Error: Cannot find module 'combined-stream'\nRequire stack:\n- /var/task/node_modules/@googlemaps/google-maps-services-js/node_modules/form-data/lib/form_data.js

image

Please be sure to include as much information as possible:

Environment details

  1. zipcode: 3333
  2. win10
  3. nodejs, serverless

Code example

# example

import GoogleMaps from '@googlemaps/google-maps-services-js';

let googleMapsClient;

function createGoogleMapsClient() {
  if (googleMapsClient) {
    return googleMapsClient;
  }
  googleMapsClient = GoogleMaps.createClient({
    key: process.env.GOOGLE_PLACES_API_KEY,
  });

  return googleMapsClient;
}

export default createGoogleMapsClient;


export function placesAutoComplete(query, options = {}) {
  console.log('placesAutoComplete===');
  const components = {};
  if (options.countryCode)
    components.country =
      options.countryCode; /* can't pass undefined as country */
  return createGoogleMapsClient()
    .places.Autocomplete({
      input: query,
      components,
      types: options.types,
    })
    .then((response) => response.json.predictions);
}

image

seems like form-data trying to find combined-stream

image

Following these steps will guarantee the quickest resolution possible.

Thanks!

@juztinlazaro juztinlazaro added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 15, 2023
@wangela
Copy link
Member

wangela commented Jun 15, 2023

If you would like to upvote the priority of this issue, please comment below or react with 👍 so we can see what is popular when we triage.

@juztinlazaro Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@juztinlazaro
Copy link
Author

@amuramoto any thoughts?

@amuramoto
Copy link
Member

amuramoto commented Jun 15, 2023

When are you seeing this crash? Is it on start up? npm install? Sometime during runtime when the code above is called?

I'm not seeing a similar crash when our test or build steps run. Have you tried wiping node_modules and reinstalling?

@juztinlazaro
Copy link
Author

@amuramoto yes in startup, FYI im using nodeJS and we deployed it in AWS lambda, already wiping node_modules and reinstalling the packages.

@usefulthink
Copy link
Contributor

Is this issue still occuring in the latest version?

The combined-stream package is a transitive dependency of axios (via form-data), and should definitely be installed together with axios. If it's not, there's something bad going on that we can't really help debug.

@usefulthink usefulthink added type: question Request for information or clarification. Not an issue. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. triage me I really want to be triaged. labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

4 participants