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 run gulp #2435

Closed
blindbox opened this issue Jan 12, 2017 · 5 comments
Closed

Unable to run gulp #2435

blindbox opened this issue Jan 12, 2017 · 5 comments

Comments

@blindbox
Copy link

blindbox commented Jan 12, 2017

Do you want to request a feature or report a bug?
A bug. Issue #927 might be related.

What is the current behavior?
Installing gulp-cli using yarn global add gulp-cli leads to the following error when running gulp


C:\Windows\System32>cmd.exe /C gulp
C:\Windows\System32>"$basedir/C:/Users/user/AppData/Local/Yarn/config/global/node_modules/.bin/gulp.cmd"   "$@"
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\System32>exit $?

Alternatively, if ran through a git bash, I'll instead get this error:

user@user-PC MINGW64 ~
$ gulp
/bin/sh: /d/Program Files/nodejs/C:/Users/user/AppData/Local/Yarn/config/global/node_modules/.bin/gulp: No such file or directory

user@user-PC MINGW64 ~
$

If the current behavior is a bug, please provide the steps to reproduce.

  • Install gulp-cli globally using yarn global add gulp-cli
  • Run gulp through Git Bash or cmd.exe

What is the expected behavior?
Gulp should run without any errors.

Please mention your node.js, yarn and operating system version.
node: v6.9.4
yarn: 0.18.1
OS: Windows 7 64-bit Ultimate.

@torifat
Copy link
Member

torifat commented Jan 12, 2017

@blindbox are you able to run any other program installed using yarn global add?

@blindbox
Copy link
Author

Nope. Here's one with maildev.

C:\Windows\System32>"$basedir/C:/Users/user/AppData/Local/Yarn/config/global/node_modules/.bin/maildev.cmd"   "$@"
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\System32>exit $?

My nodejs install is in F drive, and so is my yarn install.

I was thinking it might be related to nodejs being installed in a different drive. So, with both NodeJS and Yarn installed to drive C, here's what I get:

Using command prompt


C:\Windows\System32>"$basedir/../../Users/user/AppData/Local/Yarn/config/global/node_modules/.bin/maildev.cmd"   "$@"
The system cannot find the path specified.

C:\Windows\System32>exit $?

Using git bash (it works!)

$ maildev --version
0.14.0

I think the files generated by yarn can be quite interesting. Here's one when I installed yarn and nodejs on drive C (there's two files):

"$basedir/../../Users/user/AppData/Local/Yarn/config/global/node_modules/.bin/maildev.cmd"   "$@"
exit $?

File maildev.cmd.cmd found in the nodejs exe directory

@"%~dp0\..\..\Users\user\AppData\Local\Yarn\config\global\node_modules\.bin\maildev.cmd"   %*

Here are the same two files, generated when nodejs and yarn is installed in drive F.
File maildev.cmd found in the nodejs exe directory

"$basedir/C:/Users/user/AppData/Local/Yarn/config/global/node_modules/.bin/maildev.cmd"   "$@"
exit $?

File maildev.cmd.cmd found in the nodejs exe directory

@"%~dp0\C:\Users\user\AppData\Local\Yarn\config\global\node_modules\.bin\maildev.cmd"   %*

Also to note, running maildev.cmd.cmd instead of maildev makes maildev work.

@blindbox
Copy link
Author

I just noticed that this might be a duplicate of #2224 (didn't think of search for the windows tag)

@sharikovvladislav
Copy link

sharikovvladislav commented Jan 20, 2017

@modulexcite noticed #2224 (comment) that issue is fixed.
Can you try it again? I reinstalled yarn and now everything is fine.

@blindbox
Copy link
Author

blindbox commented Jan 20, 2017

It works. Awesome, this has been a gamebreaker preventing me from using yarn completely.

Just in case, if anyone tried reinstalling and it still doesnt work, make sure you delete all traces of *.cmd and *.cmd.cmd files that yarn generated from previous installs, and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants