type declarations
Cannot find module 'wasp/client/router' or its corresponding type declarations.ts(2307)
how do i download the type declarations
how do i download the type declarations
wasp/* packages, including wasp/client/router, which includes the type declarations you need.wasp version. Make sure it's up to date.wasp start. This should generate the necessary wasp/* packages.wasp clean. This command deletes all .wasp and node_modules files. After running wasp clean, try running wasp start again to reinstall everything.routes Object (https://wasp-lang.dev/docs/advanced/links#routes-object)wasp/* packages, including wasp/entities, which includes the type declarations you need.wasp version. Make sure it's up to date.wasp start. This should generate the necessary wasp/* packages.wasp clean. This command deletes all .wasp and node_modules files. After running wasp clean, try running wasp start again to reinstall everything.routes Object (https://wasp-lang.dev/docs/advanced/links#routes-object)wasp db migrate-dev command.UnhandledPromiseRejection error, it's generally a good practice to always handle promises with a .catch() block to handle any errors that might occur. This can help prevent unhandled promise rejections which can lead to application crashes.npm install. Here are the steps:wasp compile command. This is an internal command that won't start the project but will generate the necessary files..wasp/out/web-app directory and run npm install there..wasp/out/server directory and run npm install there.wasp start. These type declarations are part of the wasp/* packages that the compiler generates, and they are based on the declarations in your Wasp files.wasp start to start the Wasp compiler. This should generate the necessary wasp/* packages, including the type declarations.wasp clean. This command deletes all .wasp and node_modules files. After running wasp clean, try running wasp start again.routes Object (https://wasp-lang.dev/docs/advanced/links#routes-object)wasp db migrate-dev command.wasp db migrate-dev command. This command creates the database and applies any pending migrations.wasp clean. This command deletes all .wasp and node_modules files. After running wasp clean, try running wasp start again.@shared alias is used to import shared code between the server and the client. However, it seems like this alias was not converted correctly in some cases, as mentioned in this Discord support thread (🙋questionsMissing "./auth/email" specifier in "wasp" package).../../shared/utils with @shared/utils in your import statement:wasp/* packages, including wasp/client/router, which includes the type declarations you need.wasp version. Make sure it's up to date.wasp start. This should generate the necessary wasp/* packages.wasp clean. This command deletes all .wasp and node_modules files. After running wasp clean, try running wasp start again to reinstall everything.routes Object (https://wasp-lang.dev/docs/advanced/links#routes-object)wasp/* packages.wasp/* packages correctly. Make sure all your Wasp code is correct and try running the compiler again.npm uninstall -g wasp, and then reinstalling it with npm install -g wasp..bashrc file is used to configure your shell session, including setting environment variables and defining shell functions. It's unlikely that this file would directly affect the generation of type declarations in a Wasp project.PATH environment variable isn't correctly configured in your .bashrc file, it could potentially cause issues with running the Wasp compiler. The PATH environment variable is used by your shell to determine where to look for executable files, so if Wasp isn't installed in a directory listed in your PATH, your shell won't be able to find and run the Wasp compiler.echo $PATH in your shell. This will print out the directories listed in your PATH environment variable. If the directory where Wasp is installed isn't listed, you'll need to add it.PATH in your .bashrc file:.bashrc file in a text editor./path/to/wasp with the actual directory where Wasp is installed:.bashrc file by running source ~/.bashrc in your shell.wasp start to see if the issue is resolved.wasp completion help to mention .zshrc for MacOS > Original post (https://github.com/wasp-lang/wasp/issues/948)wasp start. These type declarations are part of the wasp/* packages that the compiler generates, and they are based on the declarations in your Wasp files.<project-name> with the name of your project.wasp/* packages, including the type declarations.wasp clean and then run wasp start again.wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/*wasp/client/routerwasp/client/routerwasp versionwasp versionwasp version.wasp.wasp.wasp.wasp.wasproutesroutesroutesrouteswasp/entitieswasp db migrate-devwasp db migrate-devwasp db migrate-devUnhandledPromiseRejection.catch()wasp compile.wasp/out/web-app.wasp/out/server@shared../../shared/utils@shared/utilsnpm uninstall -g waspnpm install -g waspecho $PATH/path/to/waspsource ~/.bashrcwasp completion.zshrc<project-name>cd .wasp/out/web-app
npm installcd ../server
npm installimport { cn } from '@shared/utils';export PATH=$PATH:/path/to/waspwasp new <project-name> -t saascd <project-name>wasp start