googlemaps / googlemaps/google-maps-services-js
Error: Type '"origin" | undefined' is not assignable to type '"origin"' during Build.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 654
- Avg merge
- 3m
- Merged PRs (30d)
- 4
Description
While building my Next JS project using "npm run build" I get this error.
```
Type error: Type '"origin" | undefined' is not assignable to type '"origin"'.
Type 'undefined' is not assignable to type '"origin"'.
./node_modules/@googlemaps/js-api-loader/src/index.ts:301:5
299 | }: LoaderOptions) {
300 | this.apiKey = apiKey;
> 301 | this.authReferrerPolicy = authReferrerPolicy;
| ^
302 | this.channel = channel;
303 | this.client = client;
304 | this.id = id || DEFAULT_ID; // Do not allow empty string
```
This is really annoying as i am unable to deploy the app to Vercel because of this.
Steps to reproduce:
1) Create a Next JS app
2) Install the latest version of this package
3) Build
package version 3.4.0
Next JS version 14.2.3
Typescript version ^5
Contributor guide
Assessment
This issue has not been assessed yet.