Doing pnpm install in a path without package.json shows a cryptic error message and exits with code 1.
~ $ cd /tmp
/tmp $ pnpm i
! Cannot read property 'dependencies' of undefined
For comparison, npm is also a little strange in its behavior in this case, but it at least exits successfully:
/tmp $ npm i
npm WARN enoent ENOENT: no such file or directory, open '/private/tmp/package.json'
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No README data
npm WARN tmp No license field.
# node_modules will be enumerated here, if it exists
Related #47.
Doing
pnpm installin a path without package.json shows a cryptic error message and exits with code 1.For comparison,
npmis also a little strange in its behavior in this case, but it at least exits successfully:Related #47.