Issue with Deployment related to @google/genai versus @google/generative-ai

I created my first app with Gemini. Successfully saved it to GitHub and connected to Vercel account. When I try to deploy it, I get an error:

npm error code ETARGET
npm error notarget No matching version found for @google/genai@^0.1.1.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn’t exist.
npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-12-17T03_22_24_538Z-debug-0.log
Error: Command “npm install” exited with 1

Vercel support bot says I should change the @google/genai. to “@google/generative-ai”: “^0.21.0”

Gemini bot says Note: I am intentionally keeping the package name as @google/genai (not @google/generative-ai) because your code uses the new Gemini 2.0 / Flash 2.5 APIs (GoogleGenAI class), which are only available in the newer @google/genai SDK. Switching to the old package would break your geminiService.ts.

So I’m getting conflicting advice and have no idea how to proceed. Yea, I’m a complete noob and need some simple, honest support on how to fix this.

https://seo-keyword-ranker-pro-git-main-roger-schnurs-projects.vercel.app/

Hey, welcome to Vercel

When you get an npm error that can’t find a package, the best place to check is the Versions tab for the package on npm. Here you can see that there is no 0.1.1 published (all the way at the bottom), but actually many later versions all the way up to 1.34.0

npm install @google/genai@latest will bring you up to date

https://www.npmjs.com/package/@google/genai?activeTab=versions

You’re most likely using the correct package: it’s easy for AI models to get out of date with the latest libraries in the ecosystem. If the Google bot says there’s a newer Google package, you can usually trust it to be more up to date than the others, so I would ignore the Vercel Support bot’s request that you use the older package

package.json now has latest but I still got the error:

{

“name”: “ranktracker-pro”,

“private”: true,

“version”: “1.0.0”,

“type”: “module”,

“scripts”: {

"dev": "vite",

"build": "tsc && vite build",

"preview": "vite preview"

},

“dependencies”: {

"@google/genai": "latest",

"jspdf": "^2.5.1",

"lucide-react": "^0.400.0",

"react": "^18.3.1",

"react-dom": "^18.3.1",

"recharts": "^2.12.7"

},

“devDependencies”: {

"@types/node": "^20.14.0",

"@types/react": "^18.3.3",

"@types/react-dom": "^18.3.0",

"@vitejs/plugin-react": "^4.3.1",

"autoprefixer": "^10.4.19",

"postcss": "^8.4.38",

"tailwindcss": "^3.4.4",

"typescript": "^5.4.5",

"vite": "^5.3.1"

}

}

Running build in Washington, D.C., USA (East) – iad1

Build machine configuration: 2 cores, 8 GB

Cloning github.com/rogerschnur-rgb/SEO-Keyword-Ranker-Pro (Branch: main, Commit: e2908ac)

Skipping build cache, deployment was triggered without cache.

Cloning completed: 483.000ms

Running “vercel build”

Vercel CLI 50.0.1

Installing dependencies…

npm error code ETARGET

npm error notarget No matching version found for @google/genai@^0.1.1.

npm error notarget In most cases you or one of your dependencies are requesting

npm error notarget a package version that doesn’t exist.

npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-12-17T13_14_39_849Z-debug-0.log

Error: Command “npm install” exited with 1

It appears that the package.json file the deployment is using is not the most current updated version in the repository. I’m sure there is a simple solution but I’m not sure where to navigate to fix this. Please advise! Thanks.

I created a new project hoping it would use the latest version. Here are the results:

Running build in Washington, D.C., USA (East) – iad1

Build machine configuration: 2 cores, 8 GB

Cloning github.com/rogerschnur-rgb/SEO-Keyword-Ranker-Pro (Branch: main, Commit: 22c2ef7)

Previous build caches not available.

Cloning completed: 319.000ms

Running “vercel build”

Vercel CLI 50.0.1

Installing dependencies…

npm warn deprecated node-domexception@1.0.0: Use your platform’s native DOMException instead

added 258 packages in 26s

45 packages are looking for funding

run `npm fund` for details

Running “npm run build”

> ranktracker-pro@1.0.0 build

> tsc && vite build

error TS6305: Output file ‘/vercel/path0/vite.config.d.ts’ has not been built from source file ‘/vercel/path0/vite.config.ts’.

The file is in the program because:

Matched by include pattern '.' in '/vercel/path0/tsconfig.json'

Error: Command “npm run build” exited with 2