You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happens for thanks global install and npx thanks run:
TypeError: Cannot read property 'includes' of undefined
at isScopedPkg (/home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:205:18)
at /home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:227:21
at Generator.next (<anonymous>)
at step (/home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:2:221)
at _next (/home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:2:409)
at /home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:2:477
at new Promise (<anonymous>)
at /home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:2:97
at _fetchPkg (/home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:243:24)
at fetchPkg (/home/adam/.npm-global/lib/node_modules/thanks/dist/cmd.js:220:24)
The text was updated successfully, but these errors were encountered:
Figured out the cause of this. If you have a folder in node_modules/ that has no package.json, then read-package-tree returns an empty object instead of a package.json.
That means the name property will be undefined, which eventually crashes when isScopedPkg() is called.
It happens for
thanks
global install andnpx thanks
run:The text was updated successfully, but these errors were encountered: