visgl / visgl/react-google-maps

[Bug] cannot find namespace 'google' on version 1.6.1

Open
#856 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.9k
Forks
193
Avg merge
3d 16h
Merged PRs (30d)
13

Description

Description

When updating from 1.5.5 to 1.6.1 I noticed my typecheck start failing anywhere I'm referencing google's namespace.

I see in the most recent version there was a change to tsLib, maybe related?

I also saw this old issue thread https://github.com/visgl/react-google-maps/issues/519


For reference in case it's helpful:

Here are my tsconfigs (I extend a base one in a monorepo)

// base.json
{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Default",
  "compilerOptions": {
    "composite": false,
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "allowImportingTsExtensions": true,
    "noEmit": true,
    "inlineSources": false,
    "isolatedModules": true,
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "preserveWatchOutput": true,
    "skipLibCheck": true,
    "strict": true,
    "strictNullChecks": true,
    "resolveJsonModule": true
  },
  "exclude": ["node_modules"]
}

// react-library.json

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "React Library",
  "extends": "./base.json",
  "compilerOptions": {
    "lib": ["ES2015", "DOM"],
    "module": "ESNext",
    "target": "ES6",
    "jsx": "react-jsx",
    "noEmit": true,
    "types": [
      "node",
      "@testing-library/dom",
      "@testing-library/jest-dom",
      "@testing-library/user-event",
      "@testing-library/react",
      "vitest/globals"
    ]
  }
}
// ui package config

{
  "extends": "@company/config.typescript/react-library.json",
  "include": [
    ".",
    "../../analytics/src/providers/AnalyticsProvider/PageProvider"
  ],
  "compilerOptions": {
    "lib": ["dom", "dom.iterable"]
  },
  "exclude": ["dist", "build", "node_modules"]
}
Steps to Reproduce

Will get one up when I have a minute here

Environment
  • Library version: 1.6.1
  • Google maps version: weekly
  • Browser and Version: Chrome 141.0.7390.108 ARM
  • OS: Mac OS Sequoia 15.5
Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the typecheck failure with the provided tsconfig files against versions 1.5.5 and 1.6.1, then inspect the recent tsLib-related change. Done means the reported google namespace references typecheck successfully under the supported configuration, with a regression test or reproduction added if the repository provides a suitable location.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.