Open timstoute opened 1 year ago
@timstoute Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
google-maps
tagThis is an automated message, feel free to ignore.
I'm having the same issue All my code is working properly and the module bundling works for every other package, its a nestJS application and i'm getting this error on compilation `C:\Users\Bruno\Desktop\work\project\node_modules\@googlemaps\region-lookup\dist\index.esm.js:34 import axios from "axios"; ^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.
at Module._compile (node:internal/modules/cjs/loader:1254:14)`
While deploying a TypeScript Firebase Cloud Function with the command:
firebase deploy --only functions:mapsRegionSearch
I'm seeing the error:
Error: Failed to load function definition from source: Failed to generate manifest from function source: SyntaxError: Cannot use import statement outside a module
I've isolated the issue / error to the specific cloud function shown below where I am using "@googlemaps/region-lookup"; all the other Cloud Functions in the project deploy without error when this Cloud Function is removed from the set.
Any insight on how to work around this error? I've followed the
[documentation](https://developers.google.com/maps/documentation/javascript/dds-boundaries/region-lookup)
, but I'm stuck.Node version 16.20.0 Firebase CLI version 12.2.1