{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/node/issues/9354","labels_url":"https://api.github.com/repos/joyent/node/issues/9354/labels{/name}","comments_url":"https://api.github.com/repos/joyent/node/issues/9354/comments","events_url":"https://api.github.com/repos/joyent/node/issues/9354/events","html_url":"https://github.com/joyent/node/issues/9354","id":60214383,"number":9354,"title":"[proposal] show warning when require() packages not in package.json","user":{"login":"piranna","id":532414,"avatar_url":"https://avatars.githubusercontent.com/u/532414?v=3","gravatar_id":"","url":"https://api.github.com/users/piranna","html_url":"https://github.com/piranna","followers_url":"https://api.github.com/users/piranna/followers","following_url":"https://api.github.com/users/piranna/following{/other_user}","gists_url":"https://api.github.com/users/piranna/gists{/gist_id}","starred_url":"https://api.github.com/users/piranna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piranna/subscriptions","organizations_url":"https://api.github.com/users/piranna/orgs","repos_url":"https://api.github.com/users/piranna/repos","events_url":"https://api.github.com/users/piranna/events{/privacy}","received_events_url":"https://api.github.com/users/piranna/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joyent/node/labels/feature-request","name":"feature-request","color":"0b02e1"},{"url":"https://api.github.com/repos/joyent/node/labels/module-system","name":"module-system","color":"02d7e1"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-07T16:56:33Z","updated_at":"2015-08-26T18:53:04Z","closed_at":"2015-08-26T18:53:04Z","body":"I don't know how related would be npm ```package.json``` with Node.js (or io.js), but since npm will be going to dedupe the packages diferentiating the phisical and logical packages, [we have thing](https://github.com/npm/npm/issues/6912#issuecomment-77683253) this could lead to problems by using ```require()``` of packages not defined in ```package.json```. That's why I've though that if there's a ```package.json``` file, ```require()``` would show an error message on the console when using it with a package not defined there, since it would lead to problems in the future if the dependencies change.\r\n\r\nI know the behaviour of ```require()``` is frozen, but this could be a good improvement that don't break backwards compatibility and in fact it improves the packages quality, so I think it could be included..."},"comment":{"url":"https://api.github.com/repos/joyent/node/issues/comments/135137877","html_url":"https://github.com/joyent/node/issues/9354#issuecomment-135137877","issue_url":"https://api.github.com/repos/joyent/node/issues/9354","id":135137877,"user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T18:53:04Z","updated_at":"2015-08-26T18:53:04Z","body":"Given the transition of active development over to nodejs/node, that would be the right place to discuss this further. Closing this issue here."}}