{"action":"created","issue":{"url":"https://api.github.com/repos/s-KaiNet/spsave/issues/22","repository_url":"https://api.github.com/repos/s-KaiNet/spsave","labels_url":"https://api.github.com/repos/s-KaiNet/spsave/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/s-KaiNet/spsave/issues/22/comments","events_url":"https://api.github.com/repos/s-KaiNet/spsave/issues/22/events","html_url":"https://github.com/s-KaiNet/spsave/pull/22","id":190981230,"number":22,"title":"Preinstall option for workstations without typings installed","user":{"login":"koltyakov","id":7816483,"avatar_url":"https://avatars.githubusercontent.com/u/7816483?v=3","gravatar_id":"","url":"https://api.github.com/users/koltyakov","html_url":"https://github.com/koltyakov","followers_url":"https://api.github.com/users/koltyakov/followers","following_url":"https://api.github.com/users/koltyakov/following{/other_user}","gists_url":"https://api.github.com/users/koltyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/koltyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koltyakov/subscriptions","organizations_url":"https://api.github.com/users/koltyakov/orgs","repos_url":"https://api.github.com/users/koltyakov/repos","events_url":"https://api.github.com/users/koltyakov/events{/privacy}","received_events_url":"https://api.github.com/users/koltyakov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-22T12:01:30Z","updated_at":"2016-11-22T21:22:04Z","closed_at":"2016-11-22T21:22:04Z","pull_request":{"url":"https://api.github.com/repos/s-KaiNet/spsave/pulls/22","html_url":"https://github.com/s-KaiNet/spsave/pull/22","diff_url":"https://github.com/s-KaiNet/spsave/pull/22.diff","patch_url":"https://github.com/s-KaiNet/spsave/pull/22.patch"},"body":"Hi,\r\n\r\nThis pull request adds `preinstall` option to scripts in package.json.\r\nIn the preinstall `typings` module global installation is checked and initiated if missed.\r\n\r\nThe reason for this is that there are some cases then on a workstation `typings` could be missed in global modules. As a reason, the module installation will be stopped.\r\n\r\nWhen `spsave` is used as a 3rd party reference, all dependencies installation after spsave reference will be blocked on a machine without typings installed globally.\r\n\r\nSergei, could you please check possibility to add `\"preinstall\": \"npm list typings -g || npm install typings -g\"` or remove `\"postinstall\": \"typings install\"`. Sometimes prerequisites statement in a readme can be omitted and a newbie developer could face an error."},"comment":{"url":"https://api.github.com/repos/s-KaiNet/spsave/issues/comments/262369364","html_url":"https://github.com/s-KaiNet/spsave/pull/22#issuecomment-262369364","issue_url":"https://api.github.com/repos/s-KaiNet/spsave/issues/22","id":262369364,"user":{"login":"s-KaiNet","id":10658276,"avatar_url":"https://avatars.githubusercontent.com/u/10658276?v=3","gravatar_id":"","url":"https://api.github.com/users/s-KaiNet","html_url":"https://github.com/s-KaiNet","followers_url":"https://api.github.com/users/s-KaiNet/followers","following_url":"https://api.github.com/users/s-KaiNet/following{/other_user}","gists_url":"https://api.github.com/users/s-KaiNet/gists{/gist_id}","starred_url":"https://api.github.com/users/s-KaiNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-KaiNet/subscriptions","organizations_url":"https://api.github.com/users/s-KaiNet/orgs","repos_url":"https://api.github.com/users/s-KaiNet/repos","events_url":"https://api.github.com/users/s-KaiNet/events{/privacy}","received_events_url":"https://api.github.com/users/s-KaiNet/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T21:22:04Z","updated_at":"2016-11-22T21:22:04Z","body":"This issue is actually coming from environment.   \r\nIf your environment is `development`, everything is OK, `npm install` will install both dev and production dependencies (`typings` listed under dev dependencies). Since dev dependencies are installed, `typings` is available (no need to install globally).     \r\n\r\nWhen you are running `npm install --only=production` or `npm install` with `set NODE_ENV=production` predecessor,  you have an issue that `typings` are not found. Because in that case dev dependencies are not installed and `typings` are missing (the only exception is if `typings` installed globally before).      \r\n\r\nWhat I'm going to do is to close current PR and will add `typings` into the repository (removing `postinstall` command). In that case for production you don't need `typings`, only `.js` sources, for developement you will have typings folder from repository when `git clone`"}}
{"actor":{"display_login":"s-KaiNet"}}