{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/tslint/issues/1770","repository_url":"https://api.github.com/repos/palantir/tslint","labels_url":"https://api.github.com/repos/palantir/tslint/issues/1770/labels{/name}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/1770/comments","events_url":"https://api.github.com/repos/palantir/tslint/issues/1770/events","html_url":"https://github.com/palantir/tslint/issues/1770","id":191003618,"number":1770,"title":"failing when running locally","user":{"login":"ksnyde","id":980757,"avatar_url":"https://avatars.githubusercontent.com/u/980757?v=3","gravatar_id":"","url":"https://api.github.com/users/ksnyde","html_url":"https://github.com/ksnyde","followers_url":"https://api.github.com/users/ksnyde/followers","following_url":"https://api.github.com/users/ksnyde/following{/other_user}","gists_url":"https://api.github.com/users/ksnyde/gists{/gist_id}","starred_url":"https://api.github.com/users/ksnyde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksnyde/subscriptions","organizations_url":"https://api.github.com/users/ksnyde/orgs","repos_url":"https://api.github.com/users/ksnyde/repos","events_url":"https://api.github.com/users/ksnyde/events{/privacy}","received_events_url":"https://api.github.com/users/ksnyde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-11-22T13:26:41Z","updated_at":"2016-11-23T22:00:44Z","closed_at":null,"body":"### Bug Report\r\n\r\n- __TSLint version__:  4.0.1 (both globally and locally)\r\n- __TypeScript version__: `2.0.10`\r\n- __Running TSLint via__:  npm script\r\n\r\n#### Actual Behaviour\r\n\r\nMy lint runner is an npm script which defined as this:\r\n\r\n    \"scripts\": {\r\n      \"clean\": \"rimraf lib\",\r\n      \"lint\": \"tslint --force --format verbose \\\"src/**/*.ts\\\"\",\r\n      \"build\": \"npm run clean && npm run lint && echo Using TypeScript && tsc --version && tsc --pretty\",\r\n      \"test\": \"npm run build && mocha --compilers ts:ts-node/register --recursive test/**/*-spec.ts\",\r\n      \"watch\": \"npm run build -- --watch\",\r\n      \"watch:test\": \"npm run test -- --watch\"\r\n    },\r\n\r\nIf I run `tslint --force --format verbose \"src/**/*.ts\"` from the terminal it works without  error:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/980757/20525304/a3cb5820-b0b6-11e6-948d-e0a6a94f0c43.png)\r\n\r\nIf, however, I run the npm **lint** script. It will run the locally install **tslint** and it fails with:\r\n\r\n    module.js:471\r\n        throw err;\r\n        ^\r\n\r\n    Error: Cannot find module './test/parse'\r\n        at Function.Module._resolveFilename (module.js:469:15)\r\n        at Function.Module._load (module.js:417:25)\r\n        at Module.require (module.js:497:17)\r\n        at require (internal/module.js:20:19)\r\n        at Object.<anonymous> (/Volumes/PEGASUS/repos/mine/logger/serverless-event/node_modules/tslint/lib/test.js:27:13)\r\n        at Module._compile (module.js:570:32)\r\n        at Object.Module._extensions..js (module.js:579:10)\r\n        at Module.load (module.js:487:32)\r\n        at tryModuleLoad (module.js:446:12)\r\n        at Function.Module._load (module.js:438:3)\r\n\r\n\r\nThis can be reproduced by just running the following at the terminal:\r\n\r\n    ./node_modules/.bin/tslint --force --format verbose \"src/**/*.ts\"\r\n\r\n#### Expected behavior\r\n\r\nI would expect the local install of tslint to behave the same as the global install. \r\n\r\n\r\n#### Final Note\r\nIn case it makes any difference, here are the deps in my project from `package.json`:\r\n\r\n    \"dependencies\": {\r\n      \"aws-sdk\": \"^2.7.5\",\r\n      \"bluebird\": \"^3.4.6\",\r\n      \"stacktrace-js\": \"^1.3.1\"\r\n    },\r\n    \"devDependencies\": {\r\n      \"@types/bluebird\": \"^3.0.35\",\r\n      \"@types/chai\": \"3.4.30\",\r\n      \"@types/es6-promise\": \"^0.0.32\",\r\n      \"@types/mocha\": \"2.2.29\",\r\n      \"@types/node\": \"6.0.31\",\r\n      \"@types/stacktrace-js\": \"^0.0.30\",\r\n      \"chai\": \"^3.5.0\",\r\n      \"mocha\": \"^3.0.1\",\r\n      \"rimraf\": \"^2.5.4\",\r\n      \"ts-node\": \"^1.2.2\",\r\n      \"tslint\": \"4.0.1\",\r\n      \"typescript\": \"2.0.10\"\r\n    },\r\n"},"comment":{"url":"https://api.github.com/repos/palantir/tslint/issues/comments/262640488","html_url":"https://github.com/palantir/tslint/issues/1770#issuecomment-262640488","issue_url":"https://api.github.com/repos/palantir/tslint/issues/1770","id":262640488,"user":{"login":"ksnyde","id":980757,"avatar_url":"https://avatars.githubusercontent.com/u/980757?v=3","gravatar_id":"","url":"https://api.github.com/users/ksnyde","html_url":"https://github.com/ksnyde","followers_url":"https://api.github.com/users/ksnyde/followers","following_url":"https://api.github.com/users/ksnyde/following{/other_user}","gists_url":"https://api.github.com/users/ksnyde/gists{/gist_id}","starred_url":"https://api.github.com/users/ksnyde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksnyde/subscriptions","organizations_url":"https://api.github.com/users/ksnyde/orgs","repos_url":"https://api.github.com/users/ksnyde/repos","events_url":"https://api.github.com/users/ksnyde/events{/privacy}","received_events_url":"https://api.github.com/users/ksnyde/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T22:00:44Z","updated_at":"2016-11-23T22:00:44Z","body":"I have two cases where this is happening but here is one:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/980757/20580064/26716582-b1c8-11e6-8922-f05cdfd0527f.png)\r\n\r\nis this helpful? Also, for what its worth, I have a \"test\" directory which also has typescript in it which also fails in the same way."}}
{"actor":{"display_login":"ksnyde"}}