admin管理员组文章数量:1289832
I recently came across Gatsby JS () and decided to build my portfolio site on top of the generator.
So I forked their starter site (gatsby-starter-default) and built my portfolio with it ()
Locally (using 'gatsby develop
') it runs fine - but when I deploy to Netlify with 'gatsby build
' I get this error:
11:30:58 AM: Build started
11:30:59 AM: Fetching cached dependencies
11:30:59 AM: Expected build cache - but failed to find it
11:30:59 AM: No cached dependencies found. Cloning fresh repo
11:30:59 AM: git clone [email protected]:ArchieHicklin/Archie /mnt/build-work/1475033459125476884/repo
11:31:00 AM: git remote rm origin /mnt/build-work/1475033459125476884/repo
11:31:00 AM: Preparing Branch
11:31:01 AM: Building site
11:31:01 AM: Running build mand
11:31:02 AM: Running Build
11:31:02 AM: Building
11:31:03 AM: 0.0%
11:31:03 AM: 1.2%
11:31:04 AM: ## 3.6%
11:31:04 AM: ##### 7.
11:31:04 AM: 0%
11:31:04 AM: ######## 12.5%
11:31:04 AM: ##############
11:31:04 AM:
11:31:04 AM: 20.7%
11:31:04 AM: ###################
11:31:04 AM: 27.0%
11:31:04 AM: ############################### 44.3%
11:31:04 AM: ################################################## 70.0%
11:31:04 AM: ############################################################# 86.1%
11:31:04 AM: ########################################################################
11:31:04 AM: 100.0%
11:31:05 AM:
11:31:05 AM: Computing checksum with sha256sum
11:31:05 AM: Checksums matched!
11:31:06 AM: Using version v4.4.2 of node
11:31:06 AM: Using /opt/buildhome/.rvm/gems/ruby-2.1.2
11:31:06 AM: Installing npm modules
11:31:07 AM: NPM modules installed
11:31:08 AM: /opt/build/build.sh: line 232: gatsby: mand not found
11:31:08 AM: Cached node modules
11:31:08 AM: Cleaning up docker container
11:31:08 AM: Error running mand: Build script returned non-zero exit code: 127
11:31:08 AM: Error running mand: Build script returned non-zero exit code: 127
Have done all the standard things like reinstall node and npm (as I thought it may be an issue) but, after a few weeks, I am absolutely stumped as to what the issue is. Likewise, there isn't a huge amount of documentation online so fairly stuck as to where to even start with tackling this issue.
Any help (even pointers in where to start re debugging) would be really really appreciated!
I recently came across Gatsby JS (https://github./gatsbyjs/gatsby) and decided to build my portfolio site on top of the generator.
So I forked their starter site (gatsby-starter-default) and built my portfolio with it (https://github./ArchieHicklin/Archie)
Locally (using 'gatsby develop
') it runs fine - but when I deploy to Netlify with 'gatsby build
' I get this error:
11:30:58 AM: Build started
11:30:59 AM: Fetching cached dependencies
11:30:59 AM: Expected build cache - but failed to find it
11:30:59 AM: No cached dependencies found. Cloning fresh repo
11:30:59 AM: git clone [email protected]:ArchieHicklin/Archie /mnt/build-work/1475033459125476884/repo
11:31:00 AM: git remote rm origin /mnt/build-work/1475033459125476884/repo
11:31:00 AM: Preparing Branch
11:31:01 AM: Building site
11:31:01 AM: Running build mand
11:31:02 AM: Running Build
11:31:02 AM: Building
11:31:03 AM: 0.0%
11:31:03 AM: 1.2%
11:31:04 AM: ## 3.6%
11:31:04 AM: ##### 7.
11:31:04 AM: 0%
11:31:04 AM: ######## 12.5%
11:31:04 AM: ##############
11:31:04 AM:
11:31:04 AM: 20.7%
11:31:04 AM: ###################
11:31:04 AM: 27.0%
11:31:04 AM: ############################### 44.3%
11:31:04 AM: ################################################## 70.0%
11:31:04 AM: ############################################################# 86.1%
11:31:04 AM: ########################################################################
11:31:04 AM: 100.0%
11:31:05 AM:
11:31:05 AM: Computing checksum with sha256sum
11:31:05 AM: Checksums matched!
11:31:06 AM: Using version v4.4.2 of node
11:31:06 AM: Using /opt/buildhome/.rvm/gems/ruby-2.1.2
11:31:06 AM: Installing npm modules
11:31:07 AM: NPM modules installed
11:31:08 AM: /opt/build/build.sh: line 232: gatsby: mand not found
11:31:08 AM: Cached node modules
11:31:08 AM: Cleaning up docker container
11:31:08 AM: Error running mand: Build script returned non-zero exit code: 127
11:31:08 AM: Error running mand: Build script returned non-zero exit code: 127
Have done all the standard things like reinstall node and npm (as I thought it may be an issue) but, after a few weeks, I am absolutely stumped as to what the issue is. Likewise, there isn't a huge amount of documentation online so fairly stuck as to where to even start with tackling this issue.
Any help (even pointers in where to start re debugging) would be really really appreciated!
Share Improve this question asked Sep 28, 2016 at 3:42 ArchieArchie 1071 gold badge3 silver badges7 bronze badges2 Answers
Reset to default 4Check if you have package-lock.json
file mited to your code repository. If so, delete it from the repo, and trigger the deploy again.
Netlify build fails when it finds package-lock.json
The build log is plaining that gatsby is not installed, so make sure to add gatsby to your package.json as a dependency.
Simplest way is to run:
npm install gatsby --save
Locally and then add the updated package.json to your repository. That way netlify will know to install gatsby before running your build mand.
本文标签:
版权声明:本文标题:javascript - "Error running command: Build script returned non-zero exit code" when deploying Gatsby JS site t 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741487481a2381469.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论