You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cd server
$ sequelize db:migrate
/node_modules/sequelize-cli/bin/sequelize:19
throw new Error('Unable to find the `gulp` binary');
^
Error: Unable to find the `gulp` binary
at Object.<anonymous> (/node_modules/sequelize-cli/bin/sequelize:19:9)
[...]
var gulp = path.resolve(__dirname, '..', 'node_modules', 'gulp', 'bin', 'gulp.js') generates '/node_modules/sequelize-cli/node_modules/gulp/bin/gulp.js' with __dirname being '/node_modules/sequelize-cli/bin'.
gulp = path.resolve(process.cwd(), 'node_modules', 'gulp', 'bin', 'gulp.js') generates '/server/node_modules/gulp/bin/gulp.js' with process.cwd() being '/server'.
FYI my PATH contains /node_modules/.bin
Edit: var gulp = path.resolve(__dirname, '..', '..', 'gulp', 'bin', 'gulp.js') works in this case and generates: '/node_modules/gulp/bin/gulp.js'
The text was updated successfully, but these errors were encountered:
tkrotoff
added a commit
to tkrotoff/cli
that referenced
this issue
Jun 2, 2015
Hi. We noticed that issue as well at some point. It might be an option to use the resolve module https://github.com/substack/node-resolve. Need to think about it
I have a structure like this:
Debugging https://github.com/sequelize/cli/blob/v1.7.0/bin/sequelize:
var gulp = path.resolve(__dirname, '..', 'node_modules', 'gulp', 'bin', 'gulp.js')
generates '/node_modules/sequelize-cli/node_modules/gulp/bin/gulp.js' with __dirname being '/node_modules/sequelize-cli/bin'.gulp = path.resolve(process.cwd(), 'node_modules', 'gulp', 'bin', 'gulp.js')
generates '/server/node_modules/gulp/bin/gulp.js' with process.cwd() being '/server'.FYI my PATH contains /node_modules/.bin
Edit:
var gulp = path.resolve(__dirname, '..', '..', 'gulp', 'bin', 'gulp.js')
works in this case and generates: '/node_modules/gulp/bin/gulp.js'The text was updated successfully, but these errors were encountered: