Skip to content

Commit

Permalink
fix: update warning texts to include account ID
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarner committed Mar 17, 2024
1 parent c5daeab commit d2778af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ try {
if (!licenseKey || !accountId) {
console.error(`Error: License Key or Account ID is not configured.\n
You need to signup for a _free_ Maxmind account to get a license key.
Go to https://www.maxmind.com/en/geolite2/signup, obtain your key and
put it in the MAXMIND_LICENSE_KEY environment variable.
Go to https://www.maxmind.com/en/geolite2/signup, obtain your account ID and
license key and put them in the MAXMIND_ACCOUNT_ID and MAXMIND_LICENSE_KEY
environment variables.
If you do not have access to env vars, put this config in your package.json
file (at the root level) like this:
Expand Down
6 changes: 3 additions & 3 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const getConfigWithDir = () => {
}

console.log(
"WARN: geolite2 cannot find project's package.json file, using default configuration.\n" +
'WARN: geolite2 expects to have maxmind licence key to be present in `MAXMIND_LICENSE_KEY` env variable when package.json is unavailable.'
"WARN: geolite2 cannot find configuration in package.json file, using defaults.\n" +
"WARN: geolite2 expects to have 'MAXMIND_ACCOUNT_ID' and 'MAXMIND_LICENSE_KEY' to be present in environment variables when package.json is unavailable.",
);
console.log(
'WARN: geolite2 expected package.json to be preset at a parent of:\n%s',
'WARN: geolite2 expected package.json to be present at a parent of:\n%s',
cwd
);
};
Expand Down

0 comments on commit d2778af

Please sign in to comment.