{"action":"created","issue":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/373","repository_url":"https://api.github.com/repos/facebookincubator/create-react-app","labels_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/373/comments","events_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/373/events","html_url":"https://github.com/facebookincubator/create-react-app/issues/373","id":169593865,"number":373,"title":"Offline mode","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebookincubator/create-react-app/labels/help%20wanted","name":"help wanted","color":"128A0C"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-05T12:12:48Z","updated_at":"2016-08-05T13:19:20Z","closed_at":null,"body":"npm wizards, we need your help!\r\n\r\nPer @pselle’s [suggestion](http://thewebivore.com/checking-out-create-react-app-create-react-apps-without-configuration/), we should try to find a way to make `create-react-app` work offline.\r\n\r\nI’m not well versed in npm flags and likely won’t have time for this, so this is a perfect opportunity for you to contribute and significantly improve the user experience of Create React App.\r\n\r\nHere is the behavior we’re looking for:\r\n\r\n* Existing requirement: `create-react-app my-app` should use the most recent version of `react-scripts` if you are online. We are not changing this: we always want the users to get the most recent one.\r\n* New requirement: `create-react-app my-app` should not crash offline if you ran it at least once before. It should be able to use locally cached `react-scripts` in this case, if it exists.\r\n* Bonus: `create-react-app my-app` should use cached `react-scripts` if it knows the latest npm version *is* cached locally. In other words, even if you *are* online, we shouldn’t just refetch the whole thing if we have it locally and we know it *is* the latest version. This is not required but would make a big difference for most people.\r\n* Acceptable tradeoff: we are fine with *not* installing the latest transitive dependencies. In other words it’s fine if `react-scripts` depends on `some-package@1.0.0`, then `some-package@1.0.1` comes out, but we keep using the cached `some-package@1.0.0`.\r\n\r\nHow to achieve this? I have no idea.\r\n\r\nMaybe this would be helpful: https://addyosmani.com/blog/using-npm-offline/.\r\n\r\nWe already use `bundledDependencies` (which is a bit unusual) as part of our build process so in reality `react-scripts` is being downloaded as a single tarball rather than through the usual npm process. Perhaps this can give us the leverage to make this better (e.g. by caching that tarball somehow)."},"comment":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/comments/237848035","html_url":"https://github.com/facebookincubator/create-react-app/issues/373#issuecomment-237848035","issue_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/373","id":237848035,"user":{"login":"quarterto","id":631757,"avatar_url":"https://avatars.githubusercontent.com/u/631757?v=3","gravatar_id":"","url":"https://api.github.com/users/quarterto","html_url":"https://github.com/quarterto","followers_url":"https://api.github.com/users/quarterto/followers","following_url":"https://api.github.com/users/quarterto/following{/other_user}","gists_url":"https://api.github.com/users/quarterto/gists{/gist_id}","starred_url":"https://api.github.com/users/quarterto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quarterto/subscriptions","organizations_url":"https://api.github.com/users/quarterto/orgs","repos_url":"https://api.github.com/users/quarterto/repos","events_url":"https://api.github.com/users/quarterto/events{/privacy}","received_events_url":"https://api.github.com/users/quarterto/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T13:19:20Z","updated_at":"2016-08-05T13:19:20Z","body":"To reproduce you need a package `a` that depends on `b@^1.1.0`, where `a` is *not* in the cache, and `b@1.0.0` *is* in the cache. Then release `b@1.1.0` and try to install `a` with `---cache-min=99999999`. Instead of downloading the new version of `b`, npm will only try versions from the cache, and fail because there is no compatible version.\r\n\r\n(Hope that helps, it's not a trivial issue...)"}}
{"actor":{"display_login":"quarterto"}}