.env.server file after you're done to avoid accidental changes to your production database later.wasp db migrate-dev before attempting to use Prisma Studio. This command is crucial for setting up your database schema Discord support thread (🙋questions(Resolved) Prisma Error on Mac).wasp clean and then wasp start again. This has helped resolve Prisma-related issues for some users Discord support thread (🙋questions(Resolved) Prisma Error on Mac)..wasp/out/db/schema.prisma) is correctly configured and that the DATABASE_URL in your .env.server file is set to the correct value for your Fly.io database.rollup-plugin-esbuild package is missing. This type of error can occur due to incomplete or failed package installations. Here are some steps you can try to resolve this issue:.wasp folder and node_modules, then attempt to reinstall everything Discord support thread (🙋questionsOpenSaas setup 'Role postgres does not exist').wasp start again.package.json file in a parent directory of your project. Sometimes, this can interfere with Wasp's package management GitHub Issue (https://github.com/wasp-lang/wasp/issues/787).wasp version and upgrade if necessary Discord support thread (🙋questionsIssue with deploying my wasp app to fly.io).rollup-plugin-esbuild package is missing or cannot be found by the Node.js module resolver.Cannot find package 'rollup-plugin-esbuild': This means that the Node.js runtime is unable to locate the rollup-plugin-esbuild package, which is required by your project's build process.Error [ERR_MODULE_NOT_FOUND]: This is a standard Node.js error code indicating that a module (in this case, a package) could not be found in the project's dependencies./home/rootall/apps/minisaas-boilerplate/app/.wasp/out/server/rollup.config.js: This suggests that the missing package is required for the server-side build configuration of your Wasp project.wasp clean followed by wasp start to reinstall dependencies Discord support thread (🙋questionsOpenSaas setup 'Role postgres does not exist'), or manually installing the missing package.<app-name> with your desired app name and <region> with your preferred Fly.io region. For example:fly-server.toml and fly-client.toml files in your project root directory. You should include these files in your version control Wasp CLI setup (https://wasp-lang.dev/docs/advanced/deployment/cli#setup).--server-secret option with the deploy command:/app/src/analytics/providers/googleAnalyticsUtils.ts on line 4. This error is likely caused by an environment variable or configuration setting related to Google Analytics that is not properly set or is missing.measurementId is correctly set Wasp Google Analytics Setup (https://wasp-lang.dev/docs/integrations/google-analytics).googleAnalyticsUtils.ts file. Let's try to address this step by step:main.wasp) has the correct Google Analytics setup:--client-secret here because Google Analytics is typically used on the client side Wasp CLI deploy (https://wasp-lang.dev/docs/advanced/deployment/cli#deploy).${envVarName} env variable is required when using the ${providerName} auth provider.);node -r dotenv/config ./scripts/validate-env.mjs2024-11-10 09:21:39.930
server@0.0.0 validate-env
GOOGLE_CLIENT_ID environment variable is missing. This variable is required when using Google as an authentication provider in your Wasp app.GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET as server secrets on Fly.io. Use the following Wasp CLI command:your-client-id and your-client-secret with the actual values from your Google OAuth app Wasp CLI Environment Variables (https://wasp-lang.dev/docs/advanced/deployment/cli#environment-variables).main.wasp). It should look something like this:--server-secret option is not available for the wasp deploy fly deploy command. Let me provide you with the correct way to set environment variables for your Fly.io deployment:wasp deploy fly cmd command:npm run start-production as rootmain.wasp), ensure that your server is configured to listen on the correct port and address. Add or modify the server section:Dockerfile:Dockerfile for your server, make sure it's exposing the correct port:fly.toml file, ensure that the internal_port is set to 3000:0.0.0.0 (all interfaces) and the correct port (3000 in this case) to allow incoming connections from the Fly.io proxy.main.wasp file, look for or add a server configuration section:PORT variable set to 8080, remove it: app MyApp {
// ...
client: {
// ...
setupGoogleAnalytics: {
measurementId: "G-XXXXXXXXXX"
}
}
} app MyApp {
// ...
client: {
// ...
setupGoogleAnalytics: {
measurementId: "G-XXXXXXXXXX"
}
}
} app MyApp {
// ...
client: {
// ...
// Comment out or remove the setupGoogleAnalytics section
// setupGoogleAnalytics: {
// measurementId: "G-XXXXXXXXXX"
// }
}
} auth: {
userEntity: User,
methods: {
google: {}
},
onAuthFailedRedirectTo: "/login"
} app MyApp {
// ...
server: {
port: 3000,
host: "0.0.0.0"
}
} app MyApp {
// ...
server: {
port: 3000,
host: "0.0.0.0"
}
}fly proxy 5432 -a <db-name>wasp db studio.wasp/out/db/schema.prismarollup-plugin-esbuildrollup-plugin-esbuildrollup-plugin-esbuild wasp clean
wasp start.wasp cd .wasp/out/server
npm install rollup-plugin-esbuildCannot find package 'rollup-plugin-esbuild'Error [ERR_MODULE_NOT_FOUND]/home/rootall/apps/minisaas-boilerplate/app/.wasp/out/server/rollup.config.js wasp deploy fly setup <app-name> <region><region> wasp deploy fly setup my-wasp-app mia wasp deploy fly create-db <region> wasp deploy fly deploy wasp deploy fly deploy wasp deploy fly deploy wasp deploy fly deploy wasp deploy fly deployfly-server.tomlfly-client.toml--server-secret--server-secretwasp deploy fly deploy --server-secret MY_VAR=value/app/src/analytics/providers/googleAnalyticsUtils.tsmeasurementId wasp deploy fly deploy --server-secret GOOGLE_ANALYTICS_ID=your-measurement-idgoogleAnalyticsUtils.ts wasp deploy fly deploy --client-secret REACT_APP_GA_MEASUREMENT_ID=your-measurement-id--client-secret${envVarName} env variable is required when using the ${providerName} auth provider.GOOGLE_CLIENT_IDGOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET wasp deploy fly deploy --server-secret GOOGLE_CLIENT_ID=your-client-id --server-secret GOOGLE_CLIENT_SECRET=your-client-secretyour-client-idyour-client-secretwasp deploy fly cmdwasp deploy fly cmd secrets set GOOGLE_CLIENT_ID=253947131570-kirb3t9nnktfbj60mhqcgp4n9iu0tmak.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=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 --context=serverwasp deploy fly deploynpm run start-production wasp deploy fly cmd secrets list wasp deploy fly cmd secrets unset PORT wasp build
wasp deploy fly deploy wasp deploy fly cmd logs EXPOSE 3000 [[services]]
internal_port = 3000
# ...