Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
079e52d7
Unverified
Commit
079e52d7
authored
Mar 13, 2018
by
Jeremy Morrell
Committed by
GitHub
Mar 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more detection for known error types (#534)
parent
b576b2c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
5 deletions
+99
-5
failure.sh
lib/failure.sh
+99
-5
No files found.
lib/failure.sh
View file @
079e52d7
...
...
@@ -273,45 +273,139 @@ log_other_failures() {
local
log_file
=
"
$1
"
if
grep
-qi
"sh: 1: .*: not found"
"
$log_file
"
;
then
mcount
"failures.dev-dependency-tool-not-installed"
return
0
fi
if
grep
-qi
"Failed at the bcrypt@
\d
.
\d
.
\d
install script"
"
$log_file
"
;
then
mcount
"failures.bcrypt-permissions-issue"
return
0
fi
if
grep
-qi
"Versions of @angular/compiler-cli and typescript could not be determined"
"
$log_file
"
;
then
mcount
"failures.ng-cli-version-issue"
return
0
fi
if
grep
-qi
"Cannot read property '0' of undefined"
"
$log_file
"
;
then
mcount
"failures.npm-property-zero-issue"
return
0
fi
if
grep
-qi
"npm is known not to run on Node.js v
\d
.
\d
.
\d
"
"
$log_file
"
;
then
mcount
"failures.npm-known-bad-version"
return
0
fi
# "notarget No matching version found for" = npm
# "error Couldn't find any versions for" = yarn
if
grep
-q
-e
"notarget No matching version found for"
-e
"error Couldn't find any versions for"
"
$log_file
"
;
then
mcount
"failures.bad-version-for-dependency"
fi
if
grep
-qi
"Module not found: Error: Can't resolve"
"
$log_file
"
;
then
mcount
"failures.webpack-module-not-found"
return
0
fi
if
grep
-qi
"You are likely using a version of node-tar or npm that is incompatible with this version of Node.js"
"
$log_file
"
;
then
mcount
"failures.node-9-npm-issue"
return
0
fi
if
grep
-qi
"console.error(
\`
a bug known to break npm"
"
$log_file
"
;
then
mcount
"failures.old-node-new-npm"
return
0
fi
if
grep
-qi
"CALL_AND_RETRY_LAST Allocation failed"
"
$log_file
"
;
then
mcount
"failures.build-out-of-memory-error"
return
0
fi
if
grep
-qi
"enoent ENOENT: no such file or directory"
"
$log_file
"
;
then
mcount
"failures.npm-enoent"
return
0
fi
if
grep
-qi
"ERROR in [^ ]* from UglifyJs"
"
$log_file
"
;
then
mcount
"failures.uglifyjs"
return
0
fi
# https://github.com/angular/angular-cli/issues/4551
if
grep
-qi
"Module not found: Error: Can't resolve '
\.\/\$\$
_gendir
\/
app
\/
app
\.
module
\.
ngfactory'"
"
$log_file
"
;
then
mcount
"failures.ng-cli-issue-4551"
return
0
fi
if
grep
-qi
"Host key verification failed"
"
$log_file
"
;
then
mcount
"failures.private-git-dependency-without-auth"
return
0
fi
# same as the next test, but isolate bcyrpt specifically
if
grep
-qi
"Failed at the bcrypt@
\d\.\d\.\d
install"
"
$log_file
"
;
then
mcount
"failures.bcrypt-failed-to-build"
return
0
fi
if
grep
-qi
"Failed at the [^ ]* install script"
"
$log_file
"
;
then
mcount
"failures.dependency-failed-to-build"
return
0
fi
if
grep
-qi
"Line
\d
*: '.*' is not defined"
"
$log_file
"
;
then
mcount
"failures.undefined-variable-lint"
return
0
fi
if
grep
-qi
"npm ERR! code EBADPLATFORM"
"
$log_file
"
;
then
mcount
"failures.npm-ebadplatform"
return
0
fi
if
grep
-qi
"npm ERR! code EINVALIDPACKAGENAME"
"
$log_file
"
;
then
mcount
"failures.npm-package-name-typo"
return
0
fi
if
grep
-qi
"sh: 1: cd: can't cd to"
"
$log_file
"
;
then
mcount
"failures.cd-command-fail"
return
0
fi
# Webpack Errors
if
grep
-qi
"Module not found: Error: Can't resolve"
"
$log_file
"
;
then
mcount
"failures.webpack.module-not-found"
return
0
fi
if
grep
-qi
"sass-loader/lib/loader.js:3:14"
"
$log_file
"
;
then
mcount
"failures.webpack-sass-loader-error"
mcount
"failures.webpack.sass-loader-error"
return
0
fi
# Typescript errors
if
grep
-qi
"Property '.*' does not exist on type '.*'"
"
$log_file
"
;
then
mcount
"failures.typescript.missing-property"
return
0
fi
if
grep
-qi
"Property '.*' is private and only accessible within class '.*'"
"
$log_file
"
;
then
mcount
"failures.typescript.private-property"
return
0
fi
if
grep
-qi
"error TS2307: Cannot find module '.*'"
"
$log_file
"
;
then
mcount
"failures.typescript.missing-module"
return
0
fi
if
grep
-qi
"error TS2688: Cannot find type definition file for '.*'"
"
$log_file
"
;
then
mcount
"failures.typescript.missing-type-definition"
return
0
fi
# If we've made it this far it's not an error we've added detection for yet
mcount
"failures.unknown"
}
warning
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment