{"action":"created","issue":{"url":"https://api.github.com/repos/caolan/async/issues/1160","repository_url":"https://api.github.com/repos/caolan/async","labels_url":"https://api.github.com/repos/caolan/async/issues/1160/labels{/name}","comments_url":"https://api.github.com/repos/caolan/async/issues/1160/comments","events_url":"https://api.github.com/repos/caolan/async/issues/1160/events","html_url":"https://github.com/caolan/async/issues/1160","id":155366567,"number":1160,"title":"npm test does not work","user":{"login":"ORESoftware","id":11139560,"avatar_url":"https://avatars.githubusercontent.com/u/11139560?v=3","gravatar_id":"","url":"https://api.github.com/users/ORESoftware","html_url":"https://github.com/ORESoftware","followers_url":"https://api.github.com/users/ORESoftware/followers","following_url":"https://api.github.com/users/ORESoftware/following{/other_user}","gists_url":"https://api.github.com/users/ORESoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/ORESoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ORESoftware/subscriptions","organizations_url":"https://api.github.com/users/ORESoftware/orgs","repos_url":"https://api.github.com/users/ORESoftware/repos","events_url":"https://api.github.com/users/ORESoftware/events{/privacy}","received_events_url":"https://api.github.com/users/ORESoftware/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/caolan/async/labels/question","name":"question","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-17T21:29:11Z","updated_at":"2016-05-18T04:05:14Z","closed_at":"2016-05-18T04:05:14Z","body":"I am working on adding a test to the test suite\r\n\r\nbut when I run \"npm test\" I get\r\n\r\n\"Error: Cannot find module 'lodash/rest'\"\r\n\r\ne.g.:\r\n```\r\nAlexanders-MacBook-Pro:async Olegzandr$ sudo npm test\r\n\r\n> async@2.0.0-rc.5 test /Users/Olegzandr/WebstormProjects/async\r\n> npm run-script lint && npm run mocha-node-test\r\n\r\n\r\n> async@2.0.0-rc.5 lint /Users/Olegzandr/WebstormProjects/async\r\n> jshint lib/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/ karma.conf.js && jscs lib/ mocha_test/ perf/memory.js perf/suites.js perf/benchmark.js support/ karma.conf.js\r\n\r\nNo code style errors found.\r\n\r\n> async@2.0.0-rc.5 mocha-node-test /Users/Olegzandr/WebstormProjects/async\r\n> mocha mocha_test/ --compilers js:babel-core/register\r\n\r\nmodule.js:327\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module 'lodash/rest'\r\n    at Function.Module._resolveFilename (module.js:325:15)\r\n    at Function.Module._load (module.js:276:25)\r\n    at Module.require (module.js:353:17)\r\n    at require (internal/module.js:12:17)\r\n    at Object.<anonymous> (applyEach.js:3:1)\r\n    at Module._compile (module.js:397:26)\r\n    at loader (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:158:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:168:7)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Module.require (module.js:353:17)\r\n    at require (internal/module.js:12:17)\r\n    at Object.<anonymous> (applyEach.js:3:1)\r\n    at Module._compile (module.js:397:26)\r\n    at loader (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:158:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:168:7)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Module.require (module.js:353:17)\r\n    at require (internal/module.js:12:17)\r\n    at Object.<anonymous> (index.js:10:1)\r\n    at Module._compile (module.js:397:26)\r\n    at loader (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:158:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:168:7)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Module.require (module.js:353:17)\r\n    at require (internal/module.js:12:17)\r\n    at Object.<anonymous> (apply.js:1:13)\r\n    at Module._compile (module.js:397:26)\r\n    at loader (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:158:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/Olegzandr/WebstormProjects/async/node_modules/babel-register/lib/node.js:168:7)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Module.require (module.js:353:17)\r\n    at require (internal/module.js:12:17)\r\n    at /Users/Olegzandr/WebstormProjects/async/node_modules/mocha/lib/mocha.js:219:27\r\n    at Array.forEach (native)\r\n    at Mocha.loadFiles (/Users/Olegzandr/WebstormProjects/async/node_modules/mocha/lib/mocha.js:216:14)\r\n    at Mocha.run (/Users/Olegzandr/WebstormProjects/async/node_modules/mocha/lib/mocha.js:468:10)\r\n    at Object.<anonymous> (/Users/Olegzandr/WebstormProjects/async/node_modules/mocha/bin/_mocha:403:18)\r\n    at Module._compile (module.js:397:26)\r\n    at Object.Module._extensions..js (module.js:404:10)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Function.Module.runMain (module.js:429:10)\r\n    at startup (node.js:139:18)\r\n    at node.js:999:3\r\n\r\nnpm ERR! Darwin 15.4.0\r\nnpm ERR! argv \"/Users/Olegzandr/.nvm/versions/node/v5.4.1/bin/node\" \"/Users/Olegzandr/.nvm/versions/node/v5.4.1/bin/npm\" \"run\" \"mocha-node-test\"\r\nnpm ERR! node v5.4.1\r\nnpm ERR! npm  v3.3.12\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! async@2.0.0-rc.5 mocha-node-test: `mocha mocha_test/ --compilers js:babel-core/register`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the async@2.0.0-rc.5 mocha-node-test script 'mocha mocha_test/ --compilers js:babel-core/register'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the async package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     mocha mocha_test/ --compilers js:babel-core/register\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls async\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Users/Olegzandr/WebstormProjects/async/npm-debug.log\r\nnpm ERR! Test failed.  See above for more details.\r\nAlexanders-MacBook-Pro:async Olegzandr$ \r\n```\r\n\r\ndefinitely seems to be a problem, I even tried transpiling separately on my own with babel-cli and running separately with mocha without the --compilers arg and I get the same error - I am not that familiar with ES2015 import statements so not sure how to figure out what's wrong."},"comment":{"url":"https://api.github.com/repos/caolan/async/issues/comments/219919972","html_url":"https://github.com/caolan/async/issues/1160#issuecomment-219919972","issue_url":"https://api.github.com/repos/caolan/async/issues/1160","id":219919972,"user":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T04:05:14Z","updated_at":"2016-05-18T04:05:14Z","body":"@ORESoftware similar to AVA, suman is not going to be entirely appropriate for us to change to as we will want browser testing (done through karma). A future avenue you can perhaps explore is a) being able to convert mocha tests dynamically so suman can run on a mocha suite b) making a synchronous task runner (similar to tape) which can be run in the browser.\r\n\r\nRegardless, I'm still going to play with your project and see how I like it."}}