W
Waspβ€’2mo ago
VS

Another Deployment issue

Hey! I get another odd error here, I run wasp clean and wasp start and for everything is great and when I deploy I get this error. I tore down my previous project and used a new name and so on fly.io. Any leads would be great, I'm not getting too far with cursor let output = new ProcessOutput(code, signal, stdout, stderr, combined, message); ^ ProcessOutput [Error]: at deployClient (file:///home/anon/.local/share/wasp-lang/0.15.0/data/packages/deploy/dist/providers/fly/deploy/deploy.js:82:13) exit code: 2 (Misuse of shell builtins) at ChildProcess.<anonymous> (file:///home/anon/.local/share/wasp-lang/0.15.0/data/packages/deploy/node_modules/zx/build/core.js:146:26) at ChildProcess.emit (node:events:519:28) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5) at Process.callbackTrampoline (node:internal/async_hooks:130:17) { _code: 2, _signal: null, _stdout: '\n' + '> [email protected] build\n' + '> npm run validate-env && tsc && vite build\n' + '\n' + '\n' + '> [email protected] validate-env\n' + '> node -r dotenv/config ./scripts/validate-env.mjs\n' + '\n' + 'πŸ” Validating environment variables...\n' + "../../../src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx(18,6): error TS2786: 'DefaultLayout' cannot be used as a JSX component.\n" + " Its type 'FC<Props>' is not a valid JSX element type.\n" + " Type 'FunctionComponent<Props>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.\n" + Type 'import("/home/anon/wasp-project/vera/app/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.\n + " Type 'bigint' is not assignable to type 'ReactNode'.\n" +
8 Replies
kapa.ai
kapa.aiβ€’2mo ago
Hi @Adam. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It seems you're encountering a deployment issue with your Wasp application on Fly.io. This error appears to be related to TypeScript compilation issues during the build process. Let's break down the problem and suggest some potential solutions. 1. TypeScript Compilation Error: The main issue seems to be a TypeScript error in your AnalyticsDashboardPage.tsx file:
"../../../src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx(18,6): error TS2786: 'DefaultLayout' cannot be used as a JSX component.
Its type 'FC<Props>' is not a valid JSX element type.
"../../../src/admin/dashboards/analytics/AnalyticsDashboardPage.tsx(18,6): error TS2786: 'DefaultLayout' cannot be used as a JSX component.
Its type 'FC<Props>' is not a valid JSX element type.
This error suggests that there's a problem with how you're using the DefaultLayout component. It's possible that the component's type definition is not compatible with how it's being used in your code. 2. Potential Solutions: a. Check your DefaultLayout component: - Make sure it's properly exported and imported. - Verify that its props are correctly defined. b. Update TypeScript and React types: - Ensure you're using compatible versions of TypeScript and React types. - Try updating your dependencies to the latest versions. c. Review your tsconfig.json: - Make sure your TypeScript configuration is correct and compatible with your React setup. 3. Deployment Process: The error occurs during the build process on Fly.io, even though it works locally. This could be due to differences in the build environment or configuration. 4. Next Steps: - Double-check your AnalyticsDashboardPage.tsx file, focusing on line 18 where DefaultLayout is used. - Ensure all your dependencies are correctly installed and up-to-date. - If the issue persists, you might need to share more details about your DefaultLayout component and how it's being used. 5. Additional Resources: - You might find it helpful to review the Wasp documentation on deployment: Wasp Deployment Docs (https://wasp-lang.dev/docs/deploying) - For Fly.io specific issues, their documentation might also be useful: Fly.io Docs (https://fly.io/docs/) If you continue to face issues after trying these steps, it would be helpful to share more details about your project structure, particularly the AnalyticsDashboardPage.tsx file and the DefaultLayout component. This would allow for more specific troubleshooting. Remember, when deploying with Wasp, it's important to ensure that your local development environment closely matches the deployment environment to avoid such discrepancies. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Adam, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
mihoβ€’2mo ago
Did you modify the DefaultLayout? Are you using bigint anywhere? 🧐 What is your Wasp version? πŸ˜„ How does your package.json look like? Could you share the DefaultLayout component?
VS
VSOPβ€’2mo ago
Sure! I'll send this soon, I don't think it exactly DefaultLayout as it cascaded down and gave me many more errors. I've commented the file mostly out and use a different layout. I haven't used bigint. Using wasp 15.0. I'll debug for a few more hours, certainly I've made a silly mistake in something. Thanks for always being so responsive! I removed paddle in my package.json as I moved back to stripe and it worked? I am just happy it deploys
miho
mihoβ€’2mo ago
Could you maybe share the code which you had, but removed? It's only the package.json entry or?
VS
VSOPβ€’2mo ago
I'm looking at my git before I commit and I just took out "@paddle/paddle-js": "^1.2.3", package-lock.json has changes as well I removed paddle from package.json, deleted package-lock.json, and redeployed. I think it's curious that this didn't happen during local development, but happy it deployed!
martinsos
martinsosβ€’2mo ago
I wonder if deleting package-lock.json is what helped hm.
VS
VSOPβ€’2mo ago
most likely - this was a solution in a previous post as well. Perhaps we can put a faq about deployment problems to try that out first.
martinsos
martinsosβ€’2mo ago
Yup, that might be the right thing to do -> either that, or reducing chance of package-lock.json being an issue, if we can somehow.
Want results from more Discord servers?
Add your server