Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find the gulp binary #138

Closed
tkrotoff opened this issue May 26, 2015 · 2 comments
Closed

Unable to find the gulp binary #138

tkrotoff opened this issue May 26, 2015 · 2 comments

Comments

@tkrotoff
Copy link

I have a structure like this:

[...]/server/app.js
[...]/server/migrations/*.js
[...]/node_modules/gulp
[...]/node_modules/sequelize-cli
[...]/package.json
$ 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)
    [...]

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'

tkrotoff added a commit to tkrotoff/cli that referenced this issue Jun 2, 2015
@sdepold
Copy link
Member

sdepold commented Jun 6, 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

@sushantdhiman sushantdhiman mentioned this issue Sep 1, 2017
@sushantdhiman
Copy link
Contributor

480f3fc

codetriage-readme-bot pushed a commit to codetriage-readme-bot/cli that referenced this issue Jun 5, 2019
If the OS is windows, convert line endings from LF to CRLF when saving
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants