What's the best way to deploy with your own server? #11239
Unanswered
SpencerKaiser
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a node.js server (which is primarily just responsible for authentication via
passport
. Running locally I usenext build
and I build my own app, which is in typescript, and everything works perfectly.I'm trying to deploy to IBM Cloud and no matter what I've tried, deploying the app has been a massive pain for me. Using
cf push
locally pushes all files (including.next
) and tries to start the app but I always get the following error:Error: Could not find a valid build in the '/home/vcap/app/next' directory! Try building your app with 'next build' before starting the server.
The only workaround I could find was to hackily move all my
dev-dependencies
todependencies
and then addnext build
to mystart
script. That was working (albeit incredibly janky) but as of yesterday, I'm now getting a different error:Error: /home/vcap/app/src/components/layout.tsx: transform-react-jsx: pragma has been set but pragmaFrag has not been set
What is the right way to build my app and deploy? Was that first error being caused by something being different like the node version or the target (i.e., macOS to Linux)?
Thank you for the help!
Beta Was this translation helpful? Give feedback.
All reactions