felixrieseberg/slack-archive

Cannot find package 'es-main' on running the npx command

Stvad opened this issue ยท 5 comments

Stvad commented

Hi, I'm getting the following error when trying to run the exporter:

> npx slack-archive --help
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'es-main' imported from /Users/vlad/.npm/_npx/857523a31d18f748/node_modules/slack-archive/lib/download-files.js

My system is macOS 11.6
Node version: v16.2.0

Stvad commented

Tried with node v14 and having the same issue ๐Ÿ™

Stvad commented

I cloned it, and running that version, but on obtaining the token & trying to list channels or DMs I get 0 results ๐Ÿ™

Which channel types do you want to download?
Downloading channels...

Found 0 channels (found so far: 0)
Stvad commented

whelp nevermind the last message: though some ux feedback it's not cleare that if you select something (without toggling it) and click enter on it nothing will happen ๐Ÿ˜…

upd: seems #1 was about this as-well

es-main might need to be included in dependencies instead of devDependencies.

Thank you, this should now be fixed. Late - but fixed nontheless!