I need help with adding a new route
Dear wasp community, I'm starting my new SaaS and I want to add new pages. But when I run into this error:
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)
And I also made sure to add Studio in index.d.ts and index.js
~/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 foundMy 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