You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building or running my project using the @nuxt/scripts module, I encounter an error related to Google Maps, despite not using Google Maps in my project. The error occurs both during development and production builds, causing unexpected errors in the file ScriptGoogleMaps.vue within the @nuxt/scripts module. The errors are related to TypeScript type-checking, where the code is trying to assign undefined to a string, which causes the build to fail.
No errors related to Google Maps should occur if the project does not use Google Maps. The build and run processes should complete without these errors.
ERROR 22:02:26
ERROR(vue-tsc) Argument of type'string | undefined' is not assignable to parameter of type'string'.
Type 'undefined' is not assignable to type'string'.
FILE /Users/jonathan/Developer/Git/GitHub/Application-Website-Frontend/node_modules/@nuxt/scripts/dist/runtime/components/ScriptGoogleMaps.vue:143:34
141 |? {
142 | position: {
> 143 | lat: Number.parseFloat(_options.split(',')[0]),
| ^^^^^^^^^^^^^^^^^^^^^^
144 | lng: Number.parseFloat(_options.split(',')[1]),
145 | },
146 | }
Error during build:
ℹ Downloading scripts... @nuxt/scripts 22:05:06
├─ https://www.googletagmanager.com/gtag/js → /_scripts/cVolxLeUm6.js (48.57 kB br) @nuxt/scripts 22:05:06
node_modules/@nuxt/scripts/dist/runtime/components/ScriptGoogleMaps.vue:143:34 - error TS2345: Argument of type'string | undefined' is not assignable to parameter of type'string'.
Type 'undefined' is not assignable to type'string'.
143 lat: Number.parseFloat(_options.split(',')[0]),
~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
🐛 The bug
When building or running my project using the
@nuxt/scripts
module, I encounter an error related to Google Maps, despite not using Google Maps in my project. The error occurs both during development and production builds, causing unexpected errors in the fileScriptGoogleMaps.vue
within the@nuxt/scripts
module. The errors are related to TypeScript type-checking, where the code is trying to assign undefined to a string, which causes the build to fail.🛠️ To reproduce
https://stackblitz.com/~/github.com/JonathanXDR/Application-Website-Frontend/tree/hotfix/stackblitz
🌈 Expected behavior
No errors related to Google Maps should occur if the project does not use Google Maps. The build and run processes should complete without these errors.
ℹ️ Additional context
nuxt.config.ts:
Error during development:
Error during build:
The text was updated successfully, but these errors were encountered: