Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
525 views
in Technique[技术] by (71.8m points)

reactjs - Netlify fails to deploy GatsbyJS project

I haven't been using Netlify for a while, last time was june 2020 I believe, but now I wanted to update a previous project of mine. However I, when I attempt to delpoy the changes I pushed to github I get the error message:

6:37:55 PM: ────────────────────────────────────────────────────────────────
6:37:55 PM:   "build.command" failed                                        
6:37:55 PM: ────────────────────────────────────────────────────────────────
6:37:55 PM: ?
6:37:55 PM:   Error message
6:37:55 PM:   Command was killed with SIGSEGV (Segmentation fault): gatsby build
6:37:55 PM: ?
6:37:55 PM:   Error location
6:37:55 PM:   In Build command from Netlify app:
6:37:55 PM:   gatsby build
6:37:55 PM: ?
6:37:55 PM:   Resolved config
6:37:55 PM:   build:
6:37:55 PM:     base: /opt/build/repo
6:37:55 PM:     command: gatsby build
6:37:55 PM:     commandOrigin: ui
6:37:55 PM:     publish: /opt/build/repo/public

   
                           

I googled quite a bit, and found some posts about using CI= npm run build, which I did attempt, I wasn't sure where I should insert the command so I attempted to insert it into the deploy settings and the package.json in my project, in which I got this error message:

6:27:10 PM:   Error message
6:27:10 PM:   Command failed with exit code 139: CI= npm run build

I've tried different variations of this, but I always end up with either of the two error codes. Does anyone have any suggestions as to what might be wrong?

Here is a link to a gist with both deploy dumps: https://gist.github.com/PotatoPope/ef00c5d3b53fdb860ce29112cfa1a92e

question from:https://stackoverflow.com/questions/65873971/netlify-fails-to-deploy-gatsbyjs-project

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You don't need to insert it into your package.json file, just set it as the build command in your build and deploy settings enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...