Cannot read property 'includes' of undefined
zeke opened this issue Β· comments
Trying to run this for the https://github.com/electron/update-electron-app project, I got an error:
~/git/electron/update-electron-app master
$ npx thanks
π Reading dependencies from package tree in node_modules...(node:37960) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'includes' of undefined
at isScopedPkg (/usr/local/lib/node_modules/thanks/dist/cmd.js:205:18)
at /usr/local/lib/node_modules/thanks/dist/cmd.js:226:21
at Generator.next (<anonymous>)
at step (/usr/local/lib/node_modules/thanks/dist/cmd.js:2:221)
at _next (/usr/local/lib/node_modules/thanks/dist/cmd.js:2:409)
at /usr/local/lib/node_modules/thanks/dist/cmd.js:2:477
at new Promise (<anonymous>)
at /usr/local/lib/node_modules/thanks/dist/cmd.js:2:97
at _fetchPkg (/usr/local/lib/node_modules/thanks/dist/cmd.js:242:24)
at fetchPkg (/usr/local/lib/node_modules/thanks/dist/cmd.js:220:24)
(node:37960) 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(). (rejection id: 7)
(node:37960) [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.
$ node -v
v8.11.1
$ cat package.json | json dependencies
{
"electron-is-dev": "^0.3.0",
"github-url-to-object": "^4.0.4",
"is-url": "^1.2.4",
"ms": "^2.1.1"
}
$ cat package.json | json devDependencies
{
"jest": "^22.4.3",
"standard": "^11.0.1",
"standard-markdown": "^4.0.2",
"travis-deploy-once": "^4.4.1",
"semantic-release": "^15.1.7"
}
```
@zeke I just ran this with no issues:
$ git clone git@github.com:electron/update-electron-app.git
$ npx thanks
β You depend on 15 authors, 1 teams, and 1 organizations who are seeking donations! β¨
...
I think you may have an outdated version of thanks
installed globally that npx
is preferring instead of the latest version. Try this:
npm rm -g thanks
npx thanks
Closing this issue, but do let me know if you still encounter the error and I'll investigate further.
Worked. Thanks!
Nice :)