"ERROR Script load failed: scripts/build.sh": SyntaxError at "(function(exports, require, module, __filename, __dirname, hexo){#!/bin/bash"

https://travis-ci.org/github/chenyifaerfans/chenyifaerfans

You have a syntax error in your Bash script, and the error message says where exactly.

The shell script can be executed normally on my mac.
Can you describe it in detail?

https://travis-ci.org/github/chenyifaerfans/chenyifaerfans/jobs/691134748#L225

(function(exports, require, module, __filename, __dirname, hexo){#!/bin/bash

Is not valid Bash syntax.

Looking at previous lines, whatever is executing it is expecting Javascript source code rather than Bash.

Now this syntax error is not included in the build, but the build still fails

Now this syntax error is not included in the build, but the build still fails

https://travis-ci.org/github/chenyifaerfans/chenyifaerfans/builds/691503337?utm_medium=notification&utm_source=email

Looks like something unrelated to the original problem.

https://wiki-dev.bash-hackers.org/scripting/debuggingtips