Closed nyrosmith closed 8 years ago
Hi @nyrosmith! This is exactly why we have the validate
script! Let's figure out what's going on. The validate
script runs the following npm scripts:
Could you run each of these independently and tell me which one(s) are failing? The log you sent is unfortunately not telling me much :-)
Sure! test_config.log.txt check-coverage.log.txt cover.log.txt lint.log.txt
Linting works if I modify it to: node_modules/.bin/eslint .
Do I have to install some modules globally?
Hmmm... You shouldn't have to. What version of node/npm are you using? Could you try updating the latest versions of both and try again?
Ok, I updated node & npm and deleted and reinstalled the node_modules. Win7 64 bit node: 5.7.0 npm: 3.7.3
Same behavior as before :-( This is really annoying. My first attempt to contribute and I fail on the setup...
Hmmm... I'm still not sure what's going on here. Do you think you could run those with the flag -s
?
$ npm run lint -s
$ npm run cover -s
$ npm run build test:configs -s
$ npm run check-coverage -s
This will make npm be quiet so the output is specifically the script output. Then copy/paste the output you see in here.
Thanks for working with me on this!
Will do it tomorrow, now it's reactConf time. But with a little research I found the following: I have CRLF line endings -> lint exits not with non zero code npm-run-all kills the other tasks npm-run-all
Note: If a task exited with non zero code, the other tasks and those descendant processes are killed with SIGTERM (On Windows, with taskkill.exe /F /T).
Wil do more investigation tomorrow
npm run lint
works now after changing line endings to LF.
npm run cover -s
: cover.log.txt
cover doesnot find files to test and ends with non zero exit code
'npm run build' works
'npm run test:configs' works
npm run check-coverage -s
ERROR: No coverage files found
Current status: I got it somehow working but it feels really nasty.
npm-run-all
work in any ways, so I moved to npm run x & npm run y
|| true
to lint and test. Otherwise I get npm errors if a test or linting failsava 'src/**/*.test.js' --verbose --require ./other/setup-ava-env.js || true
I am really not sure how to proceed. Maybe I should install Linux but on the other side I think it should be possible to contribute without all this pitfalls.
I have my current package.json attached because maybe someone more experienced than me can help out and find a solution that works on Mac & Windows. And maybe all I did was just stupid and I missed something essential...
Yeah, we definitely want this to work seamlessly across platforms.
Unfortunately until we get this worked out, when you commit in this project, you'll have to skip the githook
by using --no-verify
.
And I am not allowed to commit the package.json
Do you mean you can't push to this repo? It's because you don't have access to it. You'll need to fork the repo.
If that's not what you meant, I'm not sure what you mean.
I forked it and pushed my package.json & .gitattributes to my master. When I now create a feature branch and send you a pull request then the PR also contains my package.json which might break setup in your machine. Or am I wrong?
For line endings on Windows I'd recommend using git config --global core.autocrlf input
Then in .gitattributes
have
* text=auto
Modern editors in Windows support LF line endings. I'm not aware of a reason to use CRLF
This changes are not working for me. Every npm script with npm-run-all
fails
Hmmm... I honestly think that it's an issue with your setup. AFAIK, it's working fine for @BarryThePenguin and @mikekidder right?
I'd love to give access to my machine via TeamViewer or similar tool bc. I really don't think I have anything specific setup
Are you getting the same errors you were before? Are you sure you've updated your fork with master? Could you double check that please? Thanks for your patience!
I am getting exact the same behavior as before. I deleted my fork and forked again. I also deleted the repo on my HDD and cloned the fork. I really don't know why I have problems which no one other has..
@kentcdodds You probably want to use text eol=lf
instead if tests/tools rely on specific line ending.
Thanks @RReverser! I was going to remove the ESLint rules on line endings, but then I opened up a file in vim with different line endings and it was a nightmare. Maybe I should fix my tool, but I've just never really had this problem in any other project before :-/
I've opened an issue on npm-run-all
after investigating this issue. My issue may not be related to this, but I'm not able to run validate
either...
Thanks for the feedback! I was under the impression that npm-run-all
was supposed to work cross-platform and that was part of my motivation for using the tool. I've looked at the issue you filed and it looks like some fixes may be coming soon :tada: Thank you for putting that time in!
Are there any other commands not working for you? Each script should run on all platforms and if they don't that's a bug and should be resolved.
All the other scripts run, other than cover
. It complains about not being able to find any coverage.
$ npm run validate
> webpack-validator@1.0.0-beta.6 validate C:\Projects\personal\webpack-validator
> npm-run-all --parallel lint cover build test:configs --sequential check-coverage
ERROR: cover: None-Zero Exit(1);
Hmmm, that would insinuate that the npm run cover
command is not outputting any files :-(
Shall we remove npm-run-all until the fix has landed? Would ease contributing until this works cross-platform
:+1: Definitely willing to accept using &&
instead. I'll make a PR that you can pull down and validate. Give me a second...
I have setup the project according to the Contributing guideline No matter which npm script I run I get errors.
npm run validate
generates the following npm-debug.log:npm-debug.log.txt
I really have no idea how to fix this. Sorry for the inconvenience :-(