migration
73 traces
- Collections must have a loader defined — Astro 6 removed type: 'content' / type: 'data' collectionsAstro 6 fails with ContentCollectionMissingLoader: The collection is written in the Astro 2-4 style: defineCollection({ type: 'content', schema }). Fix: Astro 6 also uses Zod 4.
- transformers v5 removed TensorFlow and JAX/Flax: TFAutoModel / FlaxAutoModel no longer exist — PyTorch onlyAfter pip install -U transformers (5.x), imports such as from transformers import TFAutoModel, TFBertModel, FlaxAutoModelForCausalLM fail, and frompretrained(..., fromtf=True) style workflows break.
- Next.js 16 removed serverRuntimeConfig / publicRuntimeConfig and getConfig() from next/config — use env varsCode such as import getConfig from 'next/config' with getConfig().publicRuntimeConfig.apiUrl, or serverRuntimeConfig/publicRuntimeConfig keys in next.config, stops working after upgrading to Next.js 16. Fix: To read a…
- Expo: expo-av is deprecated and unmaintained (removed from Expo Go in SDK 55) — use expo-audio and expo-videoModels still write import { Audio, Video } from 'expo-av' with Audio.Sound.createAsync() and <Video source=... Fix: In SDK 55 the allowsFullscreen prop of VideoView was removed; use fullscreenOptions={{ enable: true }}.
- RuntimeError: There is no current event loop in thread 'MainThread' — get_event_loop() changed in Python 3.14Code that worked on 3.12/3.13 (with only a DeprecationWarning) now crashes on Python 3.14: Typical triggers: asyncio.geteventloop().rununtilcomplete(...) at a sync entry point, geteventloop() in a default argument or…
- ESLint couldn't find an eslint.config.(js|mjs|cjs) file — ESLint 9+ ignores .eslintrc; migrate to flat configRunning npx eslint . Fix: Generate a starting flat config from the old file: Minimal hand-written equivalent: For a shareable config still in eslintrc format, wrap it with FlatCompat from @eslint/eslintrc…
- TypeScript 6/7: moduleResolution node (node10), target es5, module amd/umd deprecated in 6.0, removed in 7.0A tsconfig with "moduleResolution": "node" (or node10/classic), "target": "es5", "downlevelIteration": true, "module": "amd"|"umd"|"system"|"none", "outFile", or "esModuleInterop": false produces deprecation errors on…
- Method writeAsStringAsync imported from "expo-file-system" is deprecated — Expo SDK 54 switched the default APIAfter upgrading to Expo SDK 54, code that calls the classic functions throws at runtime: The same error is thrown for readAsStringAsync, readDirectoryAsync, moveAsync, uploadAsync and so on. Fix: Quickest (behaviour…
- SQLAlchemy 2.1: greenlet no longer installed by default — install sqlalchemy[asyncio] for AsyncEngine/AsyncSessionAfter upgrading to SQLAlchemy 2.1 (released 2026-09-24), async code using createasyncengine / AsyncSession fails at first query because the greenlet package is missing, even though the same pip install sqlalchemy…
- Auth.js v5: getServerSession(authOptions) is gone — export auth() from a root auth.ts and call await auth()Code written for NextAuth v4 (import { getServerSession } from "next-auth/next", getServerSession(authOptions), getToken({ req }) from next-auth/jwt, export { default } from "next-auth/middleware") does not fit a…
- ModuleNotFoundError: No module named 'pkg_resources' — setuptools 82 (Feb 2026) removed pkg_resourcesA fresh install or sdist build that worked before February 2026 now fails with ModuleNotFoundError: No module named 'pkgresources', either at runtime (vcstool, dropbox 11.x, older google-api-python-client, TensorBoard)…
- Expo SDK 56: `expo` no longer depends on @expo/vector-icons — add it explicitly or move to @react-native-vector-icons/*After upgrading to Expo SDK 56, imports like import { Ionicons } from '@expo/vector-icons' fail to resolve in projects that never listed @expo/vector-icons in package.json. Fix: Keep the current code working: Or…
- Express 5: req.body is undefined (not {}) when no body parser ran — destructuring req.body throwsAfter upgrading to Express 5, handlers that do const { name } = req.body throw a TypeError (cannot destructure undefined) for requests with no body, a non-JSON content type, or on routes where no parser is mounted.…
- Pydantic V1 (and pydantic.v1) on Python 3.14: silently broken until v1.10.26 / pydantic 2.13 — migrate to V2A codebase still on Pydantic V1 (or using the pydantic.v1 compat namespace from a pydantic 2.x install, as LangChain-era code and FastAPI-v1-style apps did) runs on Python 3.14 with only a UserWarning, but…
- TypeError: Invalid value '2.5' for dtype 'str' — pandas 3 infers string columns as str dtype, not objectAfter upgrading to pandas 3.0: Fix: To preview on pandas 2.x: pd.options.future.inferstring = True.
- LangGraph create_react_agent replaced by langchain.agents.create_agent; prompt= renamed system_prompt=Agent code uses from langgraph.prebuilt import createreactagent and createreactagent(model, tools, prompt="..."), the standard 2025 pattern. Fix: Pass a list of tools (functions / @tool objects), not a ToolNode;…
- Cannot use `<slot>` syntax and `{@render ...}` tags in the same component — Svelte 5 snippets replace slotsSvelte 5 compiler error slotsnippetconflict in a component that has both <slot /> and {@render ...}.
- The datasource property `url` is no longer supported in schema files (Prisma 7, P1012)After upgrading to Prisma 7 (or after the Prisma VS Code extension auto-updated to 7.x), prisma generate / prisma migrate / the editor reports a P1012 schema validation error: The wrong assumption: url =…
- pandas 3 removed frequency aliases 'H', 'T', 'M', 'Q', 'Y', 'A' — use 'h', 'min', 'ME', 'QE', 'YE'df.resample("M"), pd.daterange(..., freq="H"), freq="T", freq="A", or pd.Timedelta(1, "H") worked with a FutureWarning on pandas 2.2/2.3 and now raise on pandas 3.0. Fix: Period frequencies are separate: pd.Period(...,…
- Vitest 4 browser mode: provider: 'playwright' string is gone — use playwright() from @vitest/browser-playwrightA Vitest 3 browser-mode config (browser: { provider: 'playwright' } plus /// <reference types="@vitest/browser/providers/playwright" /> and @vitest/browser installed) does not work after upgrading to Vitest 4. Fix:…
- Zod 4: ZodError.errors is gone — use .issues; .flatten()/.format() deprecated → z.flattenError / z.treeifyErrorAfter upgrading to zod@4, result.error.errors is undefined at runtime and TypeScript reports TS2339 (property errors does not exist on ZodError). Fix: Other helpers: z.treeifyError(err) (nested { errors, properties,…
- NumPy 2: np.array(x, copy=False) now raises ValueError if a copy is needed — use np.asarrayCode written for NumPy 1.x as np.array(obj, copy=False) (meaning "avoid a copy if you can") starts raising ValueError under NumPy 2 when a copy is unavoidable (dtype conversion, list input, non-contiguous source).
- Zod 4: .default() short-circuits on undefined and must match the OUTPUT type — use .prefault() for v3 behaviorAfter upgrading to zod@4, a schema like z.string().transform(s => s.length).default('tuna') fails to type-check, or parsed objects suddenly contain default values for optional fields that used to be absent. Fix:…
- pandas 3 parses datetimes as datetime64[us], not [ns] — astype('int64') epoch values become 1000x smallerAfter upgrading to pandas 3.0, pd.todatetime(...), pd.Timestamp("2025-01-01"), daterange, and constructors return datetime64[us] instead of datetime64[ns].
- PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` packageRaised by from pydantic import BaseSettings in your code or in an older dependency (chromadb, mlserver, llama-cpp-python server, emmet) once pydantic 2.x gets installed. Fix: If the import is inside a dependency,…
- Jest 30: toBeCalled / toBeCalledWith / toReturn / toThrowError aliases removed — use toHaveBeenCalled, toThrowAfter upgrading to Jest 30, tests that use expect(fn).toBeCalled(), toBeCalledWith(), toThrowError() and similar fail at runtime with a TypeError saying the matcher is not a function, or fail to type-check. Fix: Search…
- Pydantic v1 → v2 renames: .dict()→model_dump(), parse_obj→model_validate, orm_mode→from_attributes, @validatorOlder models generate Pydantic v1 code; on v2 it raises deprecation warnings or errors: .dict(), .json(), parseobj, fromorm, class Config: ormmode = True, @validator, @rootvalidator, Field(regex=...), root fields. Fix:…
- Mixing old (on:click) and new syntaxes for event handling is not allowed — Svelte 5 uses onclick + callback propsSvelte 5 compiler error mixedeventhandlersyntaxes (for example Mixing old (on:click) and new syntaxes for event handling is not allowed. Fix: DOM events: Component events (child): Parent: <Pump on:inflate={(e) => size…
- Nuxt 4: srcDir defaults to app/ — pages/components/composables go in app/, server/ and public/ stay at root, ~ = app/In a new Nuxt 4 project (created with npm create nuxt@latest), an agent creates pages/index.vue, components/Foo.vue or composables/useX.ts at the project root, as in Nuxt 3. Fix: Target layout: Migrate automatically…
- SQLAlchemy 2.0 removed engine.execute(), raw SQL strings, implicit autocommit and select([...]) list syntaxCode in the 1.3/1.4 style fails on SQLAlchemy 2.x: engine.execute(...) does not exist, conn.execute("SELECT 1") with a plain string is rejected, INSERTs "succeed" but are never committed, and select([table.c.id])…
- ModuleNotFoundError: No module named 'imghdr' on Python 3.13 — use Pillow/filetype/puremagic insteadOn Python 3.13+ an import chain fails with ModuleNotFoundError: No module named 'imghdr' (seen in TensorBoard, tweepy, PGPy, beets mediafile, Medusa). Fix: 1.
- Cannot use `export let` in runes mode — use `$props()` instead (Svelte 5)Svelte 5 compiler error legacyexportinvalid: This happens when a component uses a rune such as $state, $derived or $props (which switches it to runes mode) and also declares props the Svelte 3/4 way with export let.…
- transformers v5: TRANSFORMERS_CACHE removed (use HF_HOME), use_auth_token→token, huggingface_hub 1.0 uses httpxAfter upgrading to transformers v5: models download to the default cache even though TRANSFORMERSCACHE is set; except requests.HTTPError no longer catches Hub download failures; proxies= passed in code is…
- AttributeError: module 'ast' has no attribute 'Num' — ast.Num/Str/Bytes/NameConstant/Ellipsis removed in 3.14On Python 3.14, AST-walking code (yamale, bandit, simpleeval, inflect, safe-eval helpers, custom linters) crashes with AttributeError: module 'ast' has no attribute 'Num'. Fix: If the error is inside a dependency,…
- AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.Importing a library (prophet, chromadb, older nflverse/weave versions) or running your own code under NumPy 2.x raises: Same family: np.NaN, np.Inf, np.complex, np.unicode, np.string, np.cast, np.product,…
- Attempted to instantiate App with `new App`, which is no longer valid in Svelte 5 — use mount()A plain Svelte + Vite app (no SvelteKit) crashes on startup with runtime error componentapiinvalidnew: Attempted to instantiate App with new App, which is no longer valid in Svelte 5.... Fix: mount is not synchronous:…
- pnpm 11 ignores the package.json "pnpm" field and non-auth .npmrc settings — move them to pnpm-workspace.yamlAfter upgrading to pnpm 11, settings that used to work silently stop applying: overrides/patchedDependencies/onlyBuiltDependencies in package.json → "pnpm": {...}, or .npmrc lines like shamefully-hoist=true,…
- Vitest 4: poolOptions, maxThreads/maxForks, singleFork and coverage.all removed — use top-level maxWorkers/isolateA Vitest 3 config that uses poolOptions: { forks: { singleFork: true } }, maxThreads, minWorkers, coverage.all: true or coverage.extensions stops behaving as expected after upgrading to Vitest 4. Fix: If tests relied…
- Astro 6 removed Astro.glob() — use import.meta.glob(..., { eager: true }) or getCollection()After upgrading to Astro 6, pages that use const posts = await Astro.glob('./posts/.md') fail to build. Fix: For real content, prefer a content collection with getCollection().
- Python 3.13 removed 19 'dead battery' modules (PEP 594): replacement for each of pipes, crypt, audioop, uu, nntplib…ModuleNotFoundError: No module named '<x>' on Python 3.13+ for one of: aifc, audioop, cgi, cgitb, chunk, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib.…
- Next.js 16: middleware.ts is deprecated, rename to proxy.ts and export function proxy (Node.js runtime only)You write or keep middleware.ts with export function middleware() in a Next.js 16 app. Fix: In next.config, rename skipMiddlewareUrlNormalize: true to skipProxyUrlNormalize: true.
- Accessing element.ref is no longer supported. ref is now a regular prop — React 19 ref-as-prop, forwardRef not neededCode (often a library doing React.cloneElement / reading child.ref) logs Accessing element.ref is no longer supported. Fix: TypeScript: type it as a prop, e.g.
- Python 3.14 stdlib removals: pkgutil.find_loader, sqlite3.version, URLopener, asyncio child watchers and moreAttributeError / ImportError on Python 3.14 for long-deprecated APIs an older model will still suggest.
- transformers v5 Trainer: tokenizer= is now processing_class=, no_cuda→use_cpu, per_gpu_*→per_device_*Training scripts written for transformers v4 fail on v5 with TypeError: ... Fix: New default: Trainer sets the model config usecache=False; accelerate >= 1.1.0 is required.
- Auth.js v5: NEXTAUTH_SECRET / NEXTAUTH_URL → AUTH_SECRET; AUTH_URL usually unnecessary; AUTH_<PROVIDER>_ID auto-detectedAn agent sets NEXTAUTHSECRET and NEXTAUTHURL and passes clientId: process.env.GITHUBID by hand in a v5 (Auth.js) project, following v4 tutorials. Fix: Behind a proxy or on a custom domain where host detection fails,…
- LangChain 1.0: from langchain.chains / langchain.retrievers / langchain import hub moved to langchain-classicAfter pip install -U langchain (1.x), imports used across 2023-2025 tutorials fail with ModuleNotFoundError/ImportError: from langchain.chains import LLMChain, from langchain.retrievers import ..., from…
- Zod 4: z.string().email()/.uuid()/.url() deprecated → z.email()/z.uuid()/z.url(); .ip()/.cidr() removedOn zod@4, z.string().email() shows as deprecated in the editor, and z.string().ip() / z.string().cidr() no longer exist (type error / not a function). Fix: Top-level formats still accept chained string checks, e.g.
- Jest 30: jest.genMockFromModule removed — use jest.createMockFromModule; jest.SpyInstance type → jest.SpiedAfter upgrading to Jest 30, jest.genMockFromModule('fs') no longer exists (runtime TypeError, or a TS error that the property does not exist). Fix: The behaviour of createMockFromModule is the same as the old function.
- React 19: propTypes and defaultProps on function components are silently ignored — use default parametersAfter upgrading to React 19, a function component's Component.defaultProps = {...} no longer applies (props come through undefined), and Component.propTypes validation warnings stop appearing. Fix: Codemod: npx…
- transformers v5: summarization/translation/question-answering/text2text pipelines removed — use text-generationpipeline("summarization"), pipeline("translationentofr"), pipeline("text2text-generation"), pipeline("question-answering") or pipeline("image-to-image") fail on transformers v5; v4-era tutorials still show them. Fix:…
- PrismaClientConstructorValidationError: Using engine type "client" requires either "adapter" or "accelerateUrl"After upgrading to Prisma 7, new PrismaClient() (or new PrismaClient({ datasourceUrl }) / new PrismaClient({ datasources: { db: { url } } })) throws at startup: Wrong assumption: PrismaClient reads the URL from the…
- Express 5: req.query is a read-only getter and the default query parser is 'simple' (no nested a[b]=1 objects)After upgrading to Express 5: middleware that assigns to req.query (e.g. Fix: Store validated/coerced values somewhere else instead of overwriting req.query: Restore nested query parsing if clients send bracket syntax:
- pandas 3: chained assignment df['a'][mask] = v silently does nothing (Copy-on-Write); SettingWithCopyWarning is goneAfter upgrading to pandas 3.0, code like df["foo"][df["bar"] > 5] = 100 or df["foo"].replace(1, 5, inplace=True) / df["col"].fillna(0, inplace=True) no longer updates df (a ChainedAssignmentError warning is emitted…
- NumPy 2.4 removed np.in1d, np.trapz, reshape(newshape=), percentile(interpolation=), np.sum(generator)Code that ran (with DeprecationWarnings) on NumPy 2.0–2.3 fails on NumPy 2.4+ with AttributeError (e.g.
- huggingface_hub 1.0: huggingface-cli removed (use hf), Repository/HfFolder gone, resume_download removedAfter huggingfacehub upgraded to 1.x (pulled in by transformers v5): huggingface-cli login / huggingface-cli download is not found; from huggingfacehub import Repository, HfFolder, InferenceApi fails;…
- Drizzle ORM 1.0 (rc): relations() / Relational Queries v1 removed — use defineRelations + drizzle({ relations })After installing drizzle-orm@rc / drizzle-orm@beta (1.0 line), code written from older docs or training data breaks: relations(users, ({ many }) => ...) blocks, drizzle(client, { schema }) setup, and queries like…
- stripe-node v22: Stripe is a real ES class — `Stripe(key)` without `new` breaks; method callbacks removedAfter upgrading to stripe v22+, old snippets break: Fix: The per-request host override was also removed.
- Astro 5/6 content layer: entry.slug is gone (use entry.id) and entry.render() → render(entry) from astro:contentWith Content Layer collections (default in Astro 5, the only option in Astro 6), post.slug is undefined, so getStaticPaths produces broken routes.
- Option "testPathPattern" was replaced by "--testPathPatterns" (Jest 30 renamed the CLI flag)After upgrading to Jest 30, a script or tool (npm script, Nx, vscode-jest, CI command) that filters tests by path exits with code 1: Wrong assumption: jest --testPathPattern=foo (singular) still works. Fix: If the same…
- TypeError: Missing parameter name at 1: https://git.new/pathToRegexpError — Express 5 needs named wildcards (/*splat)The server crashes at startup (not on a request) after npm install express pulls v5, with a stack trace inside path-to-regexp/dist/index.js: Triggered by Express 4 route patterns such as app.get('', ...),…
- TypeError: react_dom__WEBPACK_IMPORTED_MODULE_0__.render is not a function — ReactDOM.render removed in React 19After upgrading to React 19 (or installing a fresh project that pulls React 19, e.g. Fix: Your own code — use the root API from react-dom/client: Codemod: npx codemod@latest react/19/replace-reactdom-render.
- Nuxt 4: useFetch/useAsyncData data and error default to undefined (not null); same key now shares refsAfter upgrading to Nuxt 4, checks such as if (data.value === null) or v-if="error !== null" stop working, so loading or empty states render wrongly. Fix: Put shared-key fetches into a single composable so that the…
- OpenAI Assistants API was shut down 2026-08-26 — migrate threads/runs to Responses + ConversationsCode using client.beta.assistants.create, client.beta.threads.create, client.beta.threads.runs.create + polling runs.retrieve stops working. Fix: Move assistant instructions/tools into your code (instructions=,…
- Vitest 5: clearMocks defaults to true — mock call history is wiped before every testAfter upgrading to Vitest 5, assertions such as expect(fn).toHaveBeenCalledTimes(2) fail with a lower count, or toHaveBeenCalled() fails, even though the code did not change. Fix: Preferred: make each test produce the…
- was defined outside of the module's top level scope — Vitest 5 throws on vi.mock/vi.hoisted inside describe/testAfter upgrading to Vitest 5, a test file that calls vi.mock() inside describe, test, a hook or a function fails to load: In Vitest 4 and earlier this was only a warning, so a lot of existing code (and generated code)…
- Clerk Core 3 (@clerk/nextjs 7): <SignedIn>, <SignedOut>, <Protect> removed — use <Show when=...>Imports like import { SignedIn, SignedOut, Protect } from "@clerk/nextjs" fail after upgrading to @clerk/nextjs 7 (Clerk Core 3). Fix: npx @clerk/upgrade applies most of this automatically.
- Zod 4: z.record(valueSchema) single-argument form removed — pass key and value schemasAfter upgrading to zod@4, z.record(z.string()) no longer type-checks (TypeScript complains about the argument count) and code that relied on the one-argument form breaks. Fix: When the key schema is an enum, Zod 4…
- Clerk Core 3: afterSignInUrl / afterSignUpUrl / redirectUrl props removed — use fallbackRedirectUrl / forceRedirectUrlAfter sign-in, users land on the wrong page, or TypeScript rejects <SignIn afterSignInUrl="/dashboard" />, <SignUp afterSignUpUrl=...>, <UserButton afterSignOutUrl=...> after upgrading to Clerk Core 3. Fix: Use…
- ModuleNotFoundError: No module named 'cgi' on Python 3.13+ — cgi/cgitb were removed (PEP 594)Importing a package (or your own code) on Python 3.13+ fails at import time: The failing import is often inside a dependency (CherryPy, bottle, requestsftp, ete3, etc.), not your code. Fix: 1.
- Bun 1.2+: lockfile is text bun.lock, not binary bun.lockb — bun.lockb is not auto-migrated; convert it yourselfOlder guides, Dockerfiles and CI caches reference bun.lockb (e.g. Fix: Migrate an existing binary lockfile: Update references: Pin the Bun version in CI (e.g.
- Found legacy content config file in "src/content/config.ts" — Astro 6 requires src/content.config.ts with loadersAfter upgrading to Astro 6, astro dev / astro build fails with LegacyContentConfigError: The same project built without errors or warnings on Astro 5. Fix: Then give each collection a loader, remove type: and import z…
- Zod 4: `message` param deprecated → `error`; errorMap, invalid_type_error, required_error removedAfter upgrading to zod@4, z.string({ requirederror: '...', invalidtypeerror: '...' }) and z.object({...}, { errorMap: ... Fix: Global customization: z.config({ customError: (issue) => ...
- <anonymous> is not a constructor — Vitest 4 class mocks need function/class implementations, not arrow functionsAfter upgrading to Vitest 4, code under test that runs new SomeClass() on a mocked class throws <anonymous> is not a constructor (or <Name> is not a constructor). Fix: Use a function or a class as the implementation:…