{"action":"created","issue":{"url":"https://api.github.com/repos/clappr/clappr/issues/1003","repository_url":"https://api.github.com/repos/clappr/clappr","labels_url":"https://api.github.com/repos/clappr/clappr/issues/1003/labels{/name}","comments_url":"https://api.github.com/repos/clappr/clappr/issues/1003/comments","events_url":"https://api.github.com/repos/clappr/clappr/issues/1003/events","html_url":"https://github.com/clappr/clappr/issues/1003","id":157008572,"number":1003,"title":"Unable to run istanbul-mocha tests when referencing clappr","user":{"login":"iongion","id":867609,"avatar_url":"https://avatars.githubusercontent.com/u/867609?v=3","gravatar_id":"","url":"https://api.github.com/users/iongion","html_url":"https://github.com/iongion","followers_url":"https://api.github.com/users/iongion/followers","following_url":"https://api.github.com/users/iongion/following{/other_user}","gists_url":"https://api.github.com/users/iongion/gists{/gist_id}","starred_url":"https://api.github.com/users/iongion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iongion/subscriptions","organizations_url":"https://api.github.com/users/iongion/orgs","repos_url":"https://api.github.com/users/iongion/repos","events_url":"https://api.github.com/users/iongion/events{/privacy}","received_events_url":"https://api.github.com/users/iongion/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/clappr/clappr/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-26T15:16:20Z","updated_at":"2016-05-30T08:35:01Z","closed_at":null,"body":"Using clappr *0.2.52*\r\n\r\nThe command I use to start the tests:\r\n```\r\nnode_modules/.bin/babel-node ./node_modules/babel-istanbul/lib/cli cover node_modules/mocha/bin/_mocha -- --compilers js:babel-core/register --bail --sort --reporter spec --require test/bootstrap.js --recursive test/unit/**/**/*.spec.js\r\n```\r\n\r\nBut they suddenly stop running with:\r\n```\r\nW:\\Workspace\\app\\node_modules\\clappr\\src\\main.js:5\r\nimport Player from 'components/player'\r\n^^^^^^\r\n\r\nSyntaxError: Unexpected token import\r\n    at exports.runInThisContext (vm.js:53:16)\r\n    at Module._compile (module.js:387:25)\r\n    at Module._extensions..js (module.js:422:10)\r\n    at Object.require.extensions.(anonymous function) [as .js] (W:\\Workspace\\app\\node_modules\\babel-register\\lib\\node.js:166:7)\r\n```\r\n\r\nWhich looks as if babel is not being used.\r\nMy *.babelrc* has nothing special:\r\n\r\n```\r\n{\r\n  \"presets\": [\r\n    \"es2015\",\r\n    \"react\"\r\n  ],\r\n  \"env\": {\r\n    \"development\": {\r\n      \"presets\": [\"react-hmre\"]\r\n    }\r\n  },\r\n  \"plugins\": [\r\n    [\r\n      \"babel-root-import\",\r\n      {\r\n        \"rootPathPrefix\": \"~\",\r\n        \"rootPathSuffix\": \"sources/modules\"\r\n      }\r\n    ],\r\n    [\r\n      \"babel-plugin-transform-builtin-extend\",\r\n      {\r\n        \"globals\": [\r\n          \"Error\"\r\n        ]\r\n      }\r\n    ]\r\n  ]\r\n}\r\n```\r\n\r\nDo you have any ideas why this happens ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/clappr/clappr/issues/comments/222441849","html_url":"https://github.com/clappr/clappr/issues/1003#issuecomment-222441849","issue_url":"https://api.github.com/repos/clappr/clappr/issues/1003","id":222441849,"user":{"login":"iongion","id":867609,"avatar_url":"https://avatars.githubusercontent.com/u/867609?v=3","gravatar_id":"","url":"https://api.github.com/users/iongion","html_url":"https://github.com/iongion","followers_url":"https://api.github.com/users/iongion/followers","following_url":"https://api.github.com/users/iongion/following{/other_user}","gists_url":"https://api.github.com/users/iongion/gists{/gist_id}","starred_url":"https://api.github.com/users/iongion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iongion/subscriptions","organizations_url":"https://api.github.com/users/iongion/orgs","repos_url":"https://api.github.com/users/iongion/repos","events_url":"https://api.github.com/users/iongion/events{/privacy}","received_events_url":"https://api.github.com/users/iongion/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T08:35:01Z","updated_at":"2016-05-30T08:35:01Z","body":"@tjenkinson That would be awesome! I have put a question on Babel's Slack channel and the guys there also mentioned this, that the published npm should be ES5.\r\n\r\nWhat do you think about the discussion here ?\r\n\r\nhttp://stackoverflow.com/questions/29738381/how-to-publish-a-module-written-in-es6-to-npm\r\n\r\nThey are discussing of keeping your code as is but in pre-publish you actually build and that is what other will import with their `import Clappr from clappr`, solving the issue."}}
{"actor":{"display_login":"iongion"}}