The error didn't make sense, since it said I was missing "repository", yet I already had two "repository"s in the config - one for the npm
general config and one I just added inside deployToGit
.
$ deploy-to-git
<pkg>/node_modules/deploy-to-git/index.js:23
throw Error(`deployToGit requires "${field}" field in package config`);
^
Error: deployToGit requires "repository" field in package config
at Object.<anonymous> (<pkg>/node_modules/deploy-to-git/index.js:23:15)
at Module._compile (module.js:660:30)
...
diff --git a/index.js b/index.js
index 37c923d..71aefcc 100755
--- a/index.js
+++ b/index.js
@@ -20,7 +20,7 @@ for (const [field, isRequired] of entries(fields)) {
const configVar = process.env[`${variablePrefix}${field}`];
if (!configVar && isRequired) {
- throw Error(`deployToGit requires "${field}" field in package config`);
+ throw Error(`Package config is missing required field: "config.deployToGit.${field}"`);
}
Error: Package config is missing required field: "config.deployToGit.repository"
at Object.<anonymous> ...