{"action":"closed","issue":{"url":"https://api.github.com/repos/lerna/lerna/issues/281","repository_url":"https://api.github.com/repos/lerna/lerna","labels_url":"https://api.github.com/repos/lerna/lerna/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/lerna/lerna/issues/281/comments","events_url":"https://api.github.com/repos/lerna/lerna/issues/281/events","html_url":"https://github.com/lerna/lerna/issues/281","id":165732438,"number":281,"title":"lerna run failing: a package cannot see a top-level dependency","user":{"login":"staltz","id":90512,"avatar_url":"https://avatars.githubusercontent.com/u/90512?v=3","gravatar_id":"","url":"https://api.github.com/users/staltz","html_url":"https://github.com/staltz","followers_url":"https://api.github.com/users/staltz/followers","following_url":"https://api.github.com/users/staltz/following{/other_user}","gists_url":"https://api.github.com/users/staltz/gists{/gist_id}","starred_url":"https://api.github.com/users/staltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staltz/subscriptions","organizations_url":"https://api.github.com/users/staltz/orgs","repos_url":"https://api.github.com/users/staltz/repos","events_url":"https://api.github.com/users/staltz/events{/privacy}","received_events_url":"https://api.github.com/users/staltz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-15T08:04:16Z","updated_at":"2016-07-15T11:22:27Z","closed_at":"2016-07-15T11:22:27Z","body":"Basically I'm running `lerna run test` and the first package cannot see a dependency like `tslint`, which is installed on the top-level.\r\n\r\ntop-level package.json (sibling to lerna.json) has:\r\n```js\r\n{\r\n  \"private\": true,\r\n  \"license\": \"MIT\",\r\n  \"devDependencies\": {\r\n...\r\n    \"tslint\": \"3.13.0\",\r\n...\r\n  }\r\n}\r\n```\r\n\r\nAnd the first package in `packages` will use `tslint` in its `test` script.\r\n\r\nI ran on the top-level: `npm i; lerna bootstrap` and then I made sure that it installed tslint in the top-level node_modules, and package-specific dependencies in each package node_modules. Then I ran `lerna run test` and got the error:\r\n\r\n```\r\nlerna(info)    Lerna v2.0.0-beta.24\r\nlerna(info)    Independent Versioning Mode\r\nlerna(debug)   Attempting running RunCommand.initialize\r\nlerna(debug)   Successfully ran RunCommand.initialize\r\nlerna(debug)   Attempting running RunCommand.execute\r\nlerna(error)   Errored while running npm script 'test' in 'cycle-lerna-sandbox-base'\r\n    Error: Command failed: npm run test \r\n    sh: tslint: command not found\r\n    \r\n    npm ERR! Darwin 15.5.0\r\n    npm ERR! argv \"/Users/staltz/.nvm/versions/node/v6.1.0/bin/node\" \"/Users/staltz/.nvm/versions/node/v6.1.0/bin/npm\" \"run\" \"lint\"\r\n    npm ERR! node v6.1.0\r\n    npm ERR! npm  v3.8.6\r\n    npm ERR! file sh\r\n    npm ERR! code ELIFECYCLE\r\n    npm ERR! errno ENOENT\r\n    npm ERR! syscall spawn\r\n    npm ERR! cycle-lerna-sandbox-base@4.0.1 lint: `tslint -c tslint.json src/*.ts`\r\n    npm ERR! spawn ENOENT\r\n    npm ERR! \r\n    npm ERR! Failed at the cycle-lerna-sandbox-base@4.0.1 lint script 'tslint -c tslint.json src/*.ts'.\r\n    npm ERR! Make sure you have the latest version of node.js and npm installed.\r\n    npm ERR! If you do, this is most likely a problem with the cycle-lerna-sandbox-base package,\r\n    npm ERR! not with npm itself.\r\n    npm ERR! Tell the author that this fails on your system:\r\n    npm ERR!     tslint -c tslint.json src/*.ts\r\n    npm ERR! You can get information on how to open an issue for this project with:\r\n    npm ERR!     npm bugs cycle-lerna-sandbox-base\r\n    npm ERR! Or if that isn't available, you can get their info via:\r\n    npm ERR!     npm owner ls cycle-lerna-sandbox-base\r\n    npm ERR! There is likely additional logging output above.\r\n    \r\n    npm ERR! Please include the following file with any support request:\r\n    npm ERR!     /Users/staltz/oss/lerna-test/packages/base/npm-debug.log\r\n    \r\n    npm ERR! Darwin 15.5.0\r\n    npm ERR! argv \"/Users/staltz/.nvm/versions/node/v6.1.0/bin/node\" \"/Users/staltz/.nvm/versions/node/v6.1.0/bin/npm\" \"run\" \"test\"\r\n    npm ERR! node v6.1.0\r\n    npm ERR! npm  v3.8.6\r\n    npm ERR! code ELIFECYCLE\r\n    npm ERR! cycle-lerna-sandbox-base@4.0.1 test: `npm run lint && npm run mocha`\r\n    npm ERR! Exit status 1\r\n    npm ERR! \r\n    npm ERR! Failed at the cycle-lerna-sandbox-base@4.0.1 test script 'npm run lint && npm run mocha'.\r\n    npm ERR! Make sure you have the latest version of node.js and npm installed.\r\n    npm ERR! If you do, this is most likely a problem with the cycle-lerna-sandbox-base package,\r\n    npm ERR! not with npm itself.\r\n    npm ERR! Tell the author that this fails on your system:\r\n    npm ERR!     npm run lint && npm run mocha\r\n    npm ERR! You can get information on how to open an issue for this project with:\r\n    npm ERR!     npm bugs cycle-lerna-sandbox-base\r\n    npm ERR! Or if that isn't available, you can get their info via:\r\n    npm ERR!     npm owner ls cycle-lerna-sandbox-base\r\n    npm ERR! There is likely additional logging output above.\r\n    \r\n    npm ERR! Please include the following file with any support request:\r\n    npm ERR!     /Users/staltz/oss/lerna-test/packages/base/npm-debug.log\r\n    \r\n        at ChildProcess.exithandler (child_process.js:202:12)\r\n        at emitTwo (events.js:106:13)\r\n        at ChildProcess.emit (events.js:191:7)\r\n        at maybeClose (internal/child_process.js:850:16)\r\n        at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)\r\nlerna(error)   Errored while running RunCommand.execute\r\n```\r\n\r\n"}}
{"actor":{"display_login":"staltz"}}