Skip to main content
Version: Next

Migration from 0.26 to 0.27

What's new in 0.27?​

New npm organization​

Wasp's npm packages moved from the @wasp.sh organization to @wasp. The Wasp CLI is now published as @wasp/cli, and the Wasp Spec is @wasp/spec.

Prisma 6​

Wasp now uses Prisma 6. Check out Prisma's upgrade guide for the full list of changes.

Smaller Docker images​

The server's Docker image now contains only the files the server needs at runtime, instead of the whole node_modules folder. This makes the image about half the size.

Wasp finds those files by analyzing the server's imports. Some packages load their files in a non-standard way that this analysis can't follow, and you might need to list them in server.traceDeps.

The build steps are also ordered so that a code change reuses the installed dependencies, which makes rebuilding the image after a code change faster.

How to migrate?​

1. Switch to the new Wasp CLI package​

The Wasp CLI is now published as @wasp/cli instead of @wasp.sh/wasp-cli. Uninstall the old package first, otherwise npm fails with an EEXIST error when installing the new one:

npm uninstall -g @wasp.sh/wasp-cli
npm i -g @wasp/cli@0.27

2. Rename @wasp.sh/spec to @wasp/spec​

Wasp's packages moved from the @wasp.sh npm scope to @wasp. Rename the Wasp Spec dependency in your package.json:

package.json
{
"devDependencies": {
"@wasp.sh/spec": "file:.wasp/spec"
}
}

Then replace @wasp.sh/spec with @wasp/spec everywhere else in your project. That covers the imports in main.wasp.ts and any other *.wasp.ts files, and mentions in files like AGENTS.md or CLAUDE.md:

main.wasp.ts
import { app, page, route } from "@wasp.sh/spec";

3. Bump the Wasp version​

Update the version field in your Wasp config to ^0.27.0.

main.wasp.ts
export default app({
wasp: { version: "^0.26.0" },
// ...
});

And run the following command to update the Wasp libraries in your project:

wasp install

4. Upgrade to Prisma 6​

Update the Prisma packages in your package.json:

package.json
{
"dependencies": {
"@prisma/client": "5.19.1" // if already present
},
"devDependencies": {
"prisma": "5.19.1"
}
}

Then run:

wasp install
wasp db migrate-dev

Prisma 6 changed how some things are stored in the database, so wasp db migrate-dev creates a new migration if your app needs one. Prisma 6 also has a few breaking changes in Prisma Client. Check Prisma's upgrade guide to see if any of them affect your app.

5. Check the packages your server loads at runtime​

If you didn't add any npm packages to your app yourself, you can skip this step. The packages Wasp uses work out of the box.

Otherwise, check if any of the packages your server uses serve or load files from their own folder, like swagger-ui-express.

The Docker image now contains only the files Wasp finds by following the server's imports. A package that loads files in a non-standard way misses them in the image. A common case is a package that serves static assets from its own folder (e.g. swagger-ui-express), which would fail in production.

List such packages in server.traceDeps to copy all of their files:

main.wasp.ts
export default app({
// ...
server: {
traceDeps: ["swagger-ui-dist*"],
},
})

6. Install the system dependencies your app needs​

If your app doesn't run Python on the server, you can skip this step.

The generated Dockerfile no longer installs python3 in the final image, because the Wasp server doesn't use it. If your app runs Python, install it in a custom Dockerfile:

Dockerfile
RUN apk add --no-cache python3

7. Update your custom Dockerfile​

If you don't have a Dockerfile in your project's dir, you can skip this step.

The generated Dockerfile changed. Run wasp dockerfile to print it with your custom Dockerfile appended at the bottom, and check that your steps still apply to the new stages.

The final stage (server-production) no longer contains the /app/node_modules folder. It only has the server's bundle and the packages the bundle uses, in /app/.wasp/out/server. If your steps use other packages (for example, through npx), copy the full node_modules from the server-builder stage:

Dockerfile
COPY --from=server-builder /app/node_modules /app/node_modules

8. Enjoy your updated Wasp app​

That's it!