algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Error: Cannot find module './lib/import/index' #27

Closed mattdbrown closed 3 years ago

mattdbrown commented 3 years ago

Attempting to run the script so I can synchronize my Firestore collection with the Algolia index, I just can't get it running. I have tried multiple versions of node: latest, LTS, and a few other random versions to no success. Have also tried it on both macOS and Ubuntu 20.04 (on WSL2). The error message and trace is:

npx firestore-algolia-search
node:internal/modules/cjs/loader:927
  throw err;
  ^

Error: Cannot find module './lib/import/index'
Require stack:
- /home/mbrown/.npm/_npx/0ca4ecfa9810ae5b/node_modules/firestore-algolia-search/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/mbrown/.npm/_npx/0ca4ecfa9810ae5b/node_modules/firestore-algolia-search/cli.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/mbrown/.npm/_npx/0ca4ecfa9810ae5b/node_modules/firestore-algolia-search/cli.js'
  ]
}
jwd2a commented 3 years ago

I'm currently getting this error - curious if this was patched up, or if it's a new issue?

jwd2a commented 3 years ago

Follow up on previous note - specifying the version at 0.4.1 in the npx call got this to work. If anyone else runs into this, make sure to specify the version, for example: npx firestore-algolia-search@0.4.1