anc95 / inquirer-file-tree-selection

inquirer prompt for select a file or dir by file tree
50 stars 26 forks source link

Cannot find module 'inquirer-file-tree-selection-prompt' or its corresponding type declarations. #83

Closed tysian closed 1 year ago

tysian commented 1 year ago

Hey! After updating my project, along with this package, I can't import this package anymore. Here is a reproduction, I'm getting this error:

❯ node index.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/projects/node-mckcqj/node_modules/inquirer-file-tree-selection-prompt/dist/index.js' imported from /home/projects/node-mckcqj/index.js
    at InternalError.get (https://node-mckcqj.w.staticblitz.com/blitz.1f021b18268b32e6c6b2095e039ac8c9f88b0d52.js:6:292488)
    at Object.triggerUncaughtException (https://node-mckcqj.w.staticblitz.com/blitz.1f021b18268b32e6c6b2095e039ac8c9f88b0d52.js:15:355829)
    at i.loadESM (https://node-mckcqj.w.staticblitz.com/blitz.1f021b18268b32e6c6b2095e039ac8c9f88b0d52.js:6:246694)
    at async handleMainPromise (https://node-mckcqj.w.staticblitz.com/blitz.1f021b18268b32e6c6b2095e039ac8c9f88b0d52.js:6:989049) {
  code: 'ERR_MODULE_NOT_FOUND'
}

It seems like a version on npm doesn't have a dist folder. image

anc95 commented 1 year ago

@tysian Fixed. please install ^2.0.4 and try again

tysian commented 1 year ago

Works great, thank you! 🔥