ReviewMe
ReviewMe copied to clipboard
reviewme unable to find ~/publisher.json even though it exists
I think I've set up everything correctly, but the reviewme command is unable to find the publisher.json file, even though it exists. Have you seen this before? I tried searching this repo but didn't see a similar issue or wiki entry.
You can see that I'm located in my home directory (~), and I have the myappsconfig.json and publisher.json in the same directory. Do you have some idea what I might be doing wrong?
{
"slackHook":"https://hooks.slack.com/services/foo/bar",
"verbose":true,
"dryRun":true,
"interval":300,
"apps": [
{
"appId":"com.my.app",
"publisherKey":"~/publisher.json"
}
]
}
mycomputer ~ % reviewme ~/myappsconfig.json
INFO: Fetching Google Play reviews for com.my.app
Error: ENOENT: no such file or directory, open '~/publisher.json'
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at Object.exports.fetchGooglePlayReviews (/opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:86:54)
at /opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:20:21
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '~/publisher.json'
}
TypeError: Cannot read property 'client_id' of undefined
at Object.exports.fetchGooglePlayReviews (/opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:94:49)
at /opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:20:21
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:76936) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'authorize' of undefined
at Object.exports.fetchGooglePlayReviews (/opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:99:9)
at /opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:20:21
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:76936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:76936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
mycomputer ~ % ls publisher.json
publisher.json
Another interesting data point: if I remove the prepended ~/ and just run reviewme myappsconfig.json, I get a different error:
mycomputer ~ % reviewme myappsconfig.json
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module 'myappsconfig.json'
Require stack:
- /opt/homebrew/lib/node_modules/@trademe/reviewme/bin/reviewme.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/@trademe/reviewme/bin/reviewme.js:23:14)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/homebrew/lib/node_modules/@trademe/reviewme/bin/reviewme.js'
]
}