Closed JimLynchCodes closed 4 years ago
Did you try NPX?
Having the same issue. Different errors for me though.
Did you try NPX?
➜ npm run mm status
> rs@ mm /Users/kyron/Documents/dev/rs
> npx -p migrate-mongo migrate-mongo "status"
npx: installed 38 in 7.55s
(node:99589) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:99589) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:99589) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:99589) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
edit: now I think about it, it may be that I'm not running mongo atm...
I am running it locally:
npm i migrate-mongo -D
package.json
:
{
"scripts":{
"migrate-up": "migrate-mongo up",
"migrate-create": "migrate-mongo create",
"migrate-down": "migrate-mongo down",
"migrate-status": "migrate-mongo status",
}
}
npm run migrate-up
npx migrate-mongo status
seems to work for me?
The error of OP seems that he's in the wrong directory.
I'm closing this issue. Feel free the reopen when necessary.
Hi, I am trying to use this on my build server where I can't install things globally.
I was trying to run it like this:
./node_modules/migrate-mongo/bin/migrate-mongo.js up
However, when doing that I get this error output:
Appreciate any help on this. 🙏
Thanks!