Closed
Description
I'm on windows.
I followed instructions in CONTRIBUTING.md
.
I did both of the following, separately and both have failed.
First I did:
git clone https://github.com/wycats/handlebars.js.git
git submodule update --init
npm install
grunt
then I did
git clone https://github.com/wycats/handlebars.js.git --recursive
npm install
grunt
After both of the above this happened:
E:\xampp\htdocs\handlebars.js\node_modules\.bin\istanbul:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
It's weird because there is no test:cov
in the Gruntfile.js
Metadata
Metadata
Assignees
Labels
No labels
Activity
nknapp commentedon Apr 10, 2017
Looks like Grunt is calling a bash-script for. In my checkout (on Linux)
node_modules/.bin/istanbul
is not a bash script, but a JavaScript file.nknapp commentedon May 10, 2017
Could you remove the "node_modules"-directory and re-run "npm install"?
nknapp commentedon May 13, 2017
Please add a comment if this problem is not solved for you. I'd like to cleanup a little and close requests that are probably answered.
m-ahmadi commentedon May 13, 2017
"remove the node_modules directory and re-run npm install"
I just did that and nothing changed, still the same error.
Use istanbul/lib/cli.js instead of node_modules/.bin/istanbul
nknapp commentedon May 13, 2017
Could you apply the change I have commited in 611d6d5 and then run "grunt" again?
On Linux, all scripts in the "bin"-property of package.json are copied into the "node_modules"-directory.
On Windows, a ".cmd"-file and as bash-script is created instead. "grunt" runs istanbul with the "child_process.fork()"-command, which does not work with bash-scripts.
The commit directly uses the node-script instead.
m-ahmadi commentedon May 13, 2017
"apply the change in commit: 611d6d5 and then run grunt"
Force LF line-endings for spec/artifacts
nknapp commentedon May 13, 2017
I think that the file
spec/artifacts/example_1.handlebars
contains CRLF line-endings in your checkoutI have updated the branch
issue-1331
to fix this with a .gitattributes-file.I could only make this work, by removing the files (i.e. the files in
spec/artifacts
) and then dogit reset --hard
to recreate the files.The gitattributes-entry
*.handlebars text eol=lf
makes sure that the handlebars-files always have LF line-endings after checkout.Use istanbul/lib/cli.js instead of node_modules/.bin/istanbul
Force LF line-endings for spec/artifacts
13 remaining items