{"action":"created","issue":{"url":"https://api.github.com/repos/maxogden/dependency-check/issues/16","labels_url":"https://api.github.com/repos/maxogden/dependency-check/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/maxogden/dependency-check/issues/16/comments","events_url":"https://api.github.com/repos/maxogden/dependency-check/issues/16/events","html_url":"https://github.com/maxogden/dependency-check/issues/16","id":56995133,"number":16,"title":"SyntaxError: Unexpected token (23:2)","user":{"login":"wayneashleyberry","id":727262,"avatar_url":"https://avatars.githubusercontent.com/u/727262?v=3","gravatar_id":"","url":"https://api.github.com/users/wayneashleyberry","html_url":"https://github.com/wayneashleyberry","followers_url":"https://api.github.com/users/wayneashleyberry/followers","following_url":"https://api.github.com/users/wayneashleyberry/following{/other_user}","gists_url":"https://api.github.com/users/wayneashleyberry/gists{/gist_id}","starred_url":"https://api.github.com/users/wayneashleyberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayneashleyberry/subscriptions","organizations_url":"https://api.github.com/users/wayneashleyberry/orgs","repos_url":"https://api.github.com/users/wayneashleyberry/repos","events_url":"https://api.github.com/users/wayneashleyberry/events{/privacy}","received_events_url":"https://api.github.com/users/wayneashleyberry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-09T06:47:19Z","updated_at":"2015-04-06T11:30:30Z","closed_at":null,"body":"Just installed dependency check and tried it out on a project, got this error:\r\n\r\n```sh\r\n❯ dependency-check ./package.json         \r\n/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:321\r\n    throw err;\r\n          ^\r\nSyntaxError: Unexpected token (23:2)\r\n    at raise (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:319:15)\r\n    at unexpected (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1311:5)\r\n    at parseExprAtom (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:2070:7)\r\n    at parseExprSubscripts (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1933:28)\r\n    at parseMaybeUnary (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1917:16)\r\n    at parseExprOps (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1875:24)\r\n    at parseMaybeConditional (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1860:16)\r\n    at parseMaybeAssign (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1844:16)\r\n    at parseExpression (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:1830:16)\r\n    at parseExprList (/usr/local/lib/node_modules/dependency-check/node_modules/detective/node_modules/acorn/acorn.js:2381:22)\r\n```\r\n\r\nSome debug info:\r\n\r\n```sh\r\n❯ dependency-check --version\r\n2.2.0\r\n```\r\n\r\n```sh\r\n❯ npm -v\r\n2.5.1\r\n```\r\n\r\n```sh\r\n❯ node -v\r\nv0.12.0\r\n```\r\n\r\nOh, and here's my package.json, if that helps.\r\n\r\n```json\r\n{\r\n  \"name\": \"react-contact-manager\",\r\n  \"description\": \"Primedia Contact Manager, built with React.\",\r\n  \"version\": \"1.2.0\",\r\n  \"author\": \"Wayne Ashley Berry <wayne@wearenext.co.za>\",\r\n  \"browserify\": {\r\n    \"transform\": [\r\n      \"reactify\"\r\n    ]\r\n  },\r\n  \"dependencies\": {\r\n    \"condense-whitespace\": \"^1.0.0\",\r\n    \"cookies-js\": \"^1.1.0\",\r\n    \"debug\": \"^2.1.1\",\r\n    \"flux\": \"^2.0.1\",\r\n    \"honorific\": \"^1.0.0\",\r\n    \"lodash.debounce\": \"^3.0.0\",\r\n    \"moment\": \"^2.8.4\",\r\n    \"months\": \"^1.0.0\",\r\n    \"object-assign\": \"^2.0.0\",\r\n    \"primedia-person-name\": \"^1.1.2\",\r\n    \"primedia-search-args\": \"^1.0.1\",\r\n    \"promise\": \"^6.0.1\",\r\n    \"qs\": \"^2.3.3\",\r\n    \"react\": \"^0.12.1\",\r\n    \"react-document-title\": \"^0.1.3\",\r\n    \"react-router\": \"^0.11.6\",\r\n    \"superagent\": \"^0.21.0\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"browserify\": \"^8.1.1\",\r\n    \"clean-css\": \"^3.0.10\",\r\n    \"esprima-fb\": \"^10001.1.0-dev-harmony-fb\",\r\n    \"jscs\": \"^1.11.0\",\r\n    \"jsxhint\": \"^0.9.0\",\r\n    \"parallelshell\": \"^1.0.0\",\r\n    \"react-tools\": \"^0.12.1\",\r\n    \"reactify\": \"^1.0.0\",\r\n    \"superstatic\": \"^2.0.2\",\r\n    \"uglify-js\": \"^2.4.16\",\r\n    \"watchify\": \"^2.3.0\"\r\n  },\r\n  \"main\": \"src/bootstrap.js\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/we-are-next/react-contact-manager.git\"\r\n  },\r\n  \"scripts\": {\r\n    \"build\": \"browserify src/bootstrap.js -o src/bundle.js\",\r\n    \"clean\": \"rm -f src/bundle.js\",\r\n    \"css\": \"cleancss src/style.css -o src/style.min.css\",\r\n    \"dist\": \"npm run build && npm run minify && npm run css\",\r\n    \"http-server\": \"superstatic ./src -c '{\\\"routes\\\": { \\\"**\\\": \\\"index.html\\\" } }'\",\r\n    \"minify\": \"uglifyjs src/bundle.js -o src/bundle.min.js -m -c --screw-ie8 --stats\",\r\n    \"prebuild\": \"npm run clean\",\r\n    \"prestart\": \"npm run build\",\r\n    \"start\": \"parallelshell 'npm run http-server' 'npm run watch'\",\r\n    \"test\": \"jscs src/app/**/* && jsxhint src/app/**/*\",\r\n    \"watch\": \"watchify src/bootstrap.js -o src/bundle.js --debug --verbose\"\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/maxogden/dependency-check/issues/comments/90023159","html_url":"https://github.com/maxogden/dependency-check/issues/16#issuecomment-90023159","issue_url":"https://api.github.com/repos/maxogden/dependency-check/issues/16","id":90023159,"user":{"login":"voxpelli","id":34457,"avatar_url":"https://avatars.githubusercontent.com/u/34457?v=3","gravatar_id":"","url":"https://api.github.com/users/voxpelli","html_url":"https://github.com/voxpelli","followers_url":"https://api.github.com/users/voxpelli/followers","following_url":"https://api.github.com/users/voxpelli/following{/other_user}","gists_url":"https://api.github.com/users/voxpelli/gists{/gist_id}","starred_url":"https://api.github.com/users/voxpelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voxpelli/subscriptions","organizations_url":"https://api.github.com/users/voxpelli/orgs","repos_url":"https://api.github.com/users/voxpelli/repos","events_url":"https://api.github.com/users/voxpelli/events{/privacy}","received_events_url":"https://api.github.com/users/voxpelli/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T11:30:30Z","updated_at":"2015-04-06T11:30:30Z","body":"Seems like `detective` is using a five releases old version of `acorn` which in turn seems to have a problem parsing the code of the projects you are running `dependecy-check` on and thus fails when it tries to traverse all of the files to find all of the `requires()` within the project.\r\n\r\nSince `acorn` seems to be to blame for this error it could be solve by `detective` upgrading to the latest version of `acorn` – which eg. this PR in the project requests: https://github.com/substack/node-detective/pull/41"}}