-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Garbage characters in Gulp.cmd after first install #828
Comments
For sanity's sake I also just check the bash script after deleting and reinstalling the node_modules and it is also broken #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../gulp/bin/gulp.js" "$@"
ret=$?
else
node "$basedir/../gulp/bin/gulp.js" "$@"
ret=$?
fi
exit $ret
it $ret That last |
I'm having a similar issue with grunt. I have this simple install command in package.json scripts:
yarn executes the command fine (at least it looks that way)
Bu I get the following error immediately after:
Feels like certain characters in these commands are problematic, or maybe this is specific to Grunt I'm not sure. I'm running bower, eslint, mocha etc exactly the same way and they work perfectly fine. My environment details: |
Can you reproduce this with |
@yerol, I had exactly the same issue and resolved it by deleting |
@stefda that seems to be the fix. thanks. |
I have updated to |
I'm having the same problem, NodeJS 6.9.1, Yarn 0.18.1 (latest), Windows 10. By the look of it, it seems like, for some reason, during the initial installation the Seeing the code of If this rings a bell to any maintainer that would be awesome. If not, I'm willing to help solve this (I'll probably need to read some high-level code structure document, this is a complex codebase). |
Ok I got this, I couldn't go to sleep with a mistery unanswered 😄 The problem is a race condition on
So, if the first Then the final written Not sure how to solve this though. Without knowing much about how |
We are encountering the same problem as @DanReyLop with karma. Every second/third build on the buildserver fails because the cmd-file is corrupted. |
Duplicate of #2356 |
@DanReyLop Thanks for sharing! I just got the same error with npm.
|
This is still happening for me in v0.23.4. Platform: Windows 10, i7-45100U, 16GB RAM, slow spinning disk in a laptop. |
@farrago please open a new issue with steps to reproduce. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I installed yarn in Windows as per the instructions and then ran yarn in a clean project directory - no existing node_modules. Yarn picked up the package.json file and pulled down all the correct modules.
However, when I attempted to execute gulp using the command .\node_modules.bin\gulp it returned the error:
s" was unexpected at this time.
I compared the gulp.cmd file with a version installed using npm3 and there are extra unexpected characters at the end of the file:
These characters should not be there:
s" %*)
I removed the node_modules and reinstalled and there are no errors now
If the current behavior is a bug, please provide the steps to reproduce.
Steps as per above
What is the expected behavior?
The gulp.cmd should not have any bad characters after install
Please mention your node.js, yarn and operating system version.
Additional Info
My package.json file is as follows:
The text was updated successfully, but these errors were encountered: