Dear wasp community, I'm starting my new SaaS and I want to add new pages. But when I run into this error:
~/documents/yawningstudio/app$ wasp db migrate-dev🐝 --- Compiling wasp project... --------------------------------------------------✅ --- Successfully completed npm install. ----------------------------------------🐝 --- Setting up database... -----------------------------------------------------✅ --- Database successfully set up. ----------------------------------------------🐝 --- Building SDK... ------------------------------------------------------------[ Wasp ] ext-src/client/components/NavBar/contentSections.ts(8,32): error TS2339: Property 'StudioRoute' does not exist on type '{ readonly LandingPageRoute: { readonly to: "/"; readonly build: (options?: OptionalRouteOptions) => string; }; readonly LoginRoute: { readonly to: "/login"; readonly build: (options?: OptionalRouteOptions) => string; }; ... 19 more ...; readonly AdminMessagesRoute: { ...; }; }'.❌ --- [Error] Your wasp project failed to compile: -------------------------------- SDK build failed with exit code: 2❌ --- [Error] Compilation of wasp project failed: --------------------------------1 errors found
~/documents/yawningstudio/app$ wasp db migrate-dev🐝 --- Compiling wasp project... --------------------------------------------------✅ --- Successfully completed npm install. ----------------------------------------🐝 --- Setting up database... -----------------------------------------------------✅ --- Database successfully set up. ----------------------------------------------🐝 --- Building SDK... ------------------------------------------------------------[ Wasp ] ext-src/client/components/NavBar/contentSections.ts(8,32): error TS2339: Property 'StudioRoute' does not exist on type '{ readonly LandingPageRoute: { readonly to: "/"; readonly build: (options?: OptionalRouteOptions) => string; }; readonly LoginRoute: { readonly to: "/login"; readonly build: (options?: OptionalRouteOptions) => string; }; ... 19 more ...; readonly AdminMessagesRoute: { ...; }; }'.❌ --- [Error] Your wasp project failed to compile: -------------------------------- SDK build failed with exit code: 2❌ --- [Error] Compilation of wasp project failed: --------------------------------1 errors found
My understanding is that it's not detected the new route I added.
This is what contentSections.ts looks like (I added line 8 - Studio)
import type { NavigationItem } from '../NavBar/NavBar';import { routes } from 'wasp/client/router';import { BlogUrl, DocsUrl } from '../../../shared/common';export const appNavigationItems: NavigationItem[] = [ { name: 'AI Scheduler (Demo App)', to: routes.DemoAppRoute.to }, { name: 'File Upload (AWS S3)', to: routes.FileUploadRoute.to }, { name: 'Studio', to: routes.StudioRoute.to }, { name: 'Pricing', to: routes.PricingPageRoute.to }, { name: 'Documentation', to: DocsUrl }, { name: 'Blog', to: BlogUrl },];
import type { NavigationItem } from '../NavBar/NavBar';import { routes } from 'wasp/client/router';import { BlogUrl, DocsUrl } from '../../../shared/common';export const appNavigationItems: NavigationItem[] = [ { name: 'AI Scheduler (Demo App)', to: routes.DemoAppRoute.to }, { name: 'File Upload (AWS S3)', to: routes.FileUploadRoute.to }, { name: 'Studio', to: routes.StudioRoute.to }, { name: 'Pricing', to: routes.PricingPageRoute.to }, { name: 'Documentation', to: DocsUrl }, { name: 'Blog', to: BlogUrl },];
And I also made sure to add Studio in index.d.ts and index.js
Similar Threads
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.