-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
npm test: TypeError: Cannot read property 'stats' of undefined #217
Comments
You probably have different versions installed locally and globally, run the following two commands.
There is a way to fix this, but it is fairly controversial. |
Both are version 0.4.2, and both of the above commands run successfully, however |
Is the repo you are using this with open source? If so can you post a link? |
@Lokua the fix for that issue is in. We now include a check for empty test files. It's odd that it is only happening in local installs and not global, but the next release should give you a clearer error at least. |
I saw the empty files issue, I don't think this is the same (no empty *.test.js files, though there are non test files in the same folder). You can see my current test setup here (https://github.com/Lokua/o-/tree/postcss). |
@Lokua Try the following in your project directory $ npm i -g npm@latest
$ npm rm -g ava
$ npm i -g ava@latest
$ npm rm ava
$ npm i ava@latest Try it both ways again and report back. |
Same thing. Global and local ava cli calls work fine, only from > node -v
v5.0.0
> npm -v
3.3.6
> ava --version
0.4.2
> ./node_modules/.bin/ava --version
0.4.2 |
Confirmed. AVA 0.4.2, Windows 7, Node 5.0.0, NPM 3.3.6 Already fixed in master.
|
Awesomeness. Thank you. |
When I run
ava test/**/*.test.js
from cli, everything runs beautifully The same command under package.json > scripts > test, ran withnpm test
throws the error, though all the tests are still run and pass (I just don't get the "n tests passed" output due to the error afterward).Here's the error output:
The text was updated successfully, but these errors were encountered: