Skip to content

jsdom error on npm test #104

@themeteorchef

Description

@themeteorchef

When I try to run tests I'm getting the following output. Of note, linting seems to work fine but as soon as the tests start up this error happens:

rglover @ ~/projects/themeteorchef/snippets/mantra/demo (master) $ npm test

> [email protected] test /Users/rglover/projects/themeteorchef/snippets/mantra/demo
> npm run lint && npm run testonly


> [email protected] lint /Users/rglover/projects/themeteorchef/snippets/mantra/demo
> eslint ./lib ./client ./server --ext .js


> [email protected] testonly /Users/rglover/projects/themeteorchef/snippets/mantra/demo
> mocha .scripts/mocha_boot.js client/**/tests/**/*.js --compilers js:babel-core/register

/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/jsdom/lib/jsdom.js:3
() => `jsdom 7.x onward only works on Node.js 4 or newer: https://github.com/t
 ^
SyntaxError: Unexpected token )
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Module._extensions..js (module.js:478:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/babel-core/node_modules/babel-register/lib/node.js:166:7)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (mocha_boot.js:1:13)
    at Module._compile (module.js:460:26)
    at loader (/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/babel-core/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/babel-core/node_modules/babel-register/lib/node.js:168:7)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at /Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/mocha/lib/mocha.js:219:27
    at Array.forEach (native)
    at Mocha.loadFiles (/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/mocha/lib/mocha.js:216:14)
    at Mocha.run (/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/mocha/lib/mocha.js:468:10)
    at Object.<anonymous> (/Users/rglover/projects/themeteorchef/snippets/mantra/demo/node_modules/mocha/bin/_mocha:403:18)
    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

npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "testonly"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] testonly: `mocha .scripts/mocha_boot.js client/**/tests/**/*.js --compilers js:babel-core/register`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] testonly script 'mocha .scripts/mocha_boot.js client/**/tests/**/*.js --compilers js:babel-core/register'.
npm ERR! This is most likely a problem with the mantra-demo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     mocha .scripts/mocha_boot.js client/**/tests/**/*.js --compilers js:babel-core/register
npm ERR! You can get their info via:
npm ERR!     npm owner ls mantra-demo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rglover/projects/themeteorchef/snippets/mantra/demo/npm-debug.log
npm ERR! Test failed.  See above for more details.

Can this be easily solved by swapping a version somewhere or is it a bigger issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions