Closed edemauro closed 9 years ago
In case anyone runs into the same issue, I fixed it by installing sequelize and mysql as well.
Yes. This is "normal" the CLI will try to find the sequelize package in your current working directory and/or in the node paths. So you could either install the package in your local dir or in any parent directory or in the global space.
This is now broken in my mac and production docker deployment (0.12.7-slim container) when installing globally.
I was almost expecting something like this T_T
Hi @sdepold , I also have this issue, it broken my CI.. https://travis-ci.org/phodal/lan just now.
But in last day, everything work fine.
I'm sorry. See #175
Should be fixed in 1.8.3
Wow, super fast response and great fix. Thanks!
I just bumped into this same symptom. Yesterday my CI system started breaking with this same error. It's been working for months uninterrupted and I haven't made any changes. Could there have been a regression?
I managed to fix my problem temporarily, by changing my CI config from this:
- npm install sequelize-cli -g
- sequelize db:migrate
to this:
- npm install sequelize-cli
- ./node_modules/sequelize-cli/bin/sequelize db:migrate
According to my CI logs that change worked from Sunday 14th Nov --> Friday 20th Nov, but some time between then and Wednesday 25th Nov it stopped working again, and my CI is b0rked with the error:
Unable to resolve sequelize package
This config doesn't work:
- npm install sequelize-cli
- npm install sequelize-cli -g
- ./node_modules/sequelize-cli/bin/sequelize db:migrate
This config doesn't work either:
- npm install sequelize-cli
- npm install sequelize-cli -g
- sequelize db:migrate
In both cases the npm install log looks fine.
Any ideas?
I have the same issue as @richmarr
I encountered the same problem. I was able to fix it by installing sequelize
package locally as well:
npm install --save sequelize
@karloespiritu can you check if it was the same version of sequelize
... and I guess umzug
as well?
we should install both sequelize
and sequelize-cli
to use sequelize-cli.
@imdzeeshan thanks, I misunderstand the tip Unable to resolve sequelize package in xxx
especially after running the sequelize command. I thought I didn't install sequelize-cli successfully. Maybe Unable to resolve the 'sequelize' npm package in xxx
will be better 😄
Hello guys, I wasn't able to install sequelize also.
This worked for me:
npm cache clean --force npm update
.sequelizerc
file solves the problem for me~/.sequelizerc
const path = require("path");
module.exports = {
config: path.resolve("./src/database/config", "config.js"),
"models-path": path.resolve("./src/database/models"),
"seeders-path": path.resolve("./src/database/seeders"),
"migrations-path": path.resolve("./src/database/migrations"),
};
Hello,
I'm receiving the following error after running npm install -g sequelize-cli:
Unable to resolve sequelize package
Tried removing everything and reinstalling. I then removed everything and tried installing locally instead. Ran it locally with node_modules/.bin/sequelize help:init, but I'm still getting the same error:
Unable to resolve sequelize package