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

Error when using global ava command. #245

Closed
TrySound opened this issue Nov 20, 2015 · 13 comments
Closed

Error when using global ava command. #245

TrySound opened this issue Nov 20, 2015 · 13 comments
Assignees
Labels
bug current functionality does not work as desired

Comments

@TrySound
Copy link
Contributor

After updating to ava 0.5
If I run $ npm test tests are passed. If I run $ ava i get this error

Uncaught Exception:  D:\Workflow\github\rollup-plugin-string\test\index.js
  TypeError: object is not a function

Uncaught Exception:  D:\Workflow\github\rollup-plugin-string\test\index.js
  TypeError: object is not a function

Error: Never got test results from: D:\Workflow\github\rollup-plugin-string\test\index.js
    at ChildProcess.<anonymous> (C:\Users\Frontend\AppData\Roaming\nvm\v0.12.7\node_modules\ava\lib\fork.js:61:12)
    at ChildProcess.emit (events.js:110:17)
    at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
From previous event:
    at module.exports (C:\Users\Frontend\AppData\Roaming\nvm\v0.12.7\node_modules\ava\lib\fork.js:25:16)
    at run (C:\Users\Frontend\AppData\Roaming\nvm\v0.12.7\node_modules\ava\cli.js:120:9)
    at Array.map (native)
    at C:\Users\Frontend\AppData\Roaming\nvm\v0.12.7\node_modules\ava\cli.js:206:22
From previous event:
    at init (C:\Users\Frontend\AppData\Roaming\nvm\v0.12.7\node_modules\ava\cli.js:198:4)
    at Object.<anonymous> (C:\Users\Frontend\AppData\Roaming\nvm\v0.12.7\node_modules\ava\cli.js:243:2)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

The same if I try to run empty tests with t.end(); only

@sindresorhus
Copy link
Member

Could you share the test file?

@jamestalmage Any way we could show the stack of the uncaught exception?

We should also hide our own stack on Error: Never got test results from as it has no purpose and is only noise.

@TrySound
Copy link
Contributor Author

@sindresorhus
Copy link
Member

@TrySound I cloned your repo, npm installed, and ran npm test on Node.js 0.12 and worked fine for me. Weird. Can you try rm -rf node_modules && npm cache clean && npm install && npm test?

@TrySound
Copy link
Contributor Author

@sindresorhus Yeah, I think npm test runs ava from local node_modules. But as I said $ ava command doesn't work.

@sindresorhus
Copy link
Member

@TrySound Try upgrading the global AVA version?

@TrySound
Copy link
Contributor Author

D:\Workflow\github\rollup-plugin-string>ava --version
0.5.0

@sindresorhus sindresorhus added the bug current functionality does not work as desired label Nov 20, 2015
@kevbook
Copy link

kevbook commented Nov 20, 2015

Same problem

@jamestalmage
Copy link
Contributor

@jamestalmage Any way we could show the stack of the uncaught exception?

Fixed in #257. This was another Windows specific issue. Fun, fun, fun!

@EduardoLopes
Copy link

Same Problem. The test works if i run npm test and i got that same error if i run ava test.js

ava version: 0.6.1

here's the project i was trying on: https://github.com/EduardoLopes/palette-lovers. i'm on linux.

@jamestalmage jamestalmage self-assigned this Nov 26, 2015
@jamestalmage jamestalmage changed the title object is not a function Error when using global ava command. Nov 26, 2015
@TrySound
Copy link
Contributor Author

@jamestalmage Why ava-cli is not permanent solution? By the way local ava runs without errors

@jamestalmage
Copy link
Contributor

Because eventually I would like to see it just be npm install -g ava, and because that has not been discussed/approved by the rest of the AVA team.

Did it solve your problem?

@TrySound
Copy link
Contributor Author

@jamestalmage Yep, works :)

@jamestalmage
Copy link
Contributor

Fixed in #277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug current functionality does not work as desired
Projects
None yet
Development

No branches or pull requests

5 participants