Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

azure - ##[error]Bash exited with code '1'. When deploying using Pipelines

This is my first time deploying something using Pipelines, and it isn't going very well

I've setup my github repo with Pipelines, but my pipeline won't get deployed due to the error stated in the title.

I've attached an image from the build code and error, i honestly have no idea what's going on.

I'd be very appreciative if someone could point me in the right direction and tell me whats causing the issue

enter image description here


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

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

This error message in the log is the reason why your pipeline failed:npm ERR! missing script:build. There are many possible reasons for this error. For example, your package.json file do not have "build" script. Please check your package.json file.

Here is an example of where you would add the script so that you can run a build:

{ 
 "name": "Example Application", 
 "version": "1.0.0", 
 "description": "", 
 "main": "index.js", 
 "scripts": { 
    "build": "echo 'build script executed'" 
 }, 
 "author": "", 
 "license": "" 
} 

You can also refer to this ticket and check if you have the same issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
...