{"action":"created","issue":{"url":"https://api.github.com/repos/typings/typings/issues/698","repository_url":"https://api.github.com/repos/typings/typings","labels_url":"https://api.github.com/repos/typings/typings/issues/698/labels{/name}","comments_url":"https://api.github.com/repos/typings/typings/issues/698/comments","events_url":"https://api.github.com/repos/typings/typings/issues/698/events","html_url":"https://github.com/typings/typings/issues/698","id":179015219,"number":698,"title":"bundle will throw \"Unable to read typings for <package name>\" error if add npm dependencies to package.json?","user":{"login":"acrazing","id":10029810,"avatar_url":"https://avatars.githubusercontent.com/u/10029810?v=3","gravatar_id":"","url":"https://api.github.com/users/acrazing","html_url":"https://github.com/acrazing","followers_url":"https://api.github.com/users/acrazing/followers","following_url":"https://api.github.com/users/acrazing/following{/other_user}","gists_url":"https://api.github.com/users/acrazing/gists{/gist_id}","starred_url":"https://api.github.com/users/acrazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrazing/subscriptions","organizations_url":"https://api.github.com/users/acrazing/orgs","repos_url":"https://api.github.com/users/acrazing/repos","events_url":"https://api.github.com/users/acrazing/events{/privacy}","received_events_url":"https://api.github.com/users/acrazing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-24T06:45:43Z","updated_at":"2016-09-24T23:05:57Z","closed_at":null,"body":"Well, to re-pro this problem, I create a shell script as follow:\r\n\r\n```bash\r\n#!/usr/bin/env bash\r\n#\r\n# test-bundle.sh\r\n# @author acrazing\r\n# @since 2016-09-24 14:35:19\r\n# @desc\r\n#\r\n\r\nrm -rf test-bundle\r\nmkdir test-bundle\r\ncd test-bundle\r\nnpm init -y\r\ntsc --init --declaration\r\ntypings init\r\ntypings i -SG dt~object-assign\r\nnpm i -S object-assign\r\necho \"import assign = require('object-assign')\" > index.ts\r\ntsc\r\ntypings bundle -G -o bundle.d.ts\r\n```\r\n\r\nand execute it:\r\n\r\n```bash\r\n./test-bundle.sh 2>&1 | pbcopy\r\n```\r\n\r\nThe output as follow:\r\n\r\n```bash\r\nWrote to /Users/acrazing/temp/test-bundle/test-bundle/package.json:\r\n\r\n{\r\n  \"name\": \"test-bundle\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"\",\r\n  \"main\": \"index.js\",\r\n  \"scripts\": {\r\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\r\n  },\r\n  \"keywords\": [],\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\"\r\n}\r\n\r\n\r\nmessage TS6071: Successfully created a tsconfig.json file.\r\nobject-assign\r\n└── (No dependencies)\r\n\r\ntest-bundle@1.0.0 /Users/acrazing/temp/test-bundle/test-bundle\r\n└── object-assign@4.1.0 \r\n\r\nnpm WARN test-bundle@1.0.0 No description\r\nnpm WARN test-bundle@1.0.0 No repository field.\r\ntypings ERR! message Unable to read typings for \"object-assign\". The author of \"test-bundle\" needs to check the entry paths in \"package.json\" are up to date\r\ntypings ERR! caused by ENOENT: no such file or directory, open '/Users/acrazing/temp/test-bundle/test-bundle/node_modules/object-assign/index.d.ts'\r\n\r\ntypings ERR! cwd /Users/acrazing/temp/test-bundle/test-bundle\r\ntypings ERR! system Darwin 15.6.0\r\ntypings ERR! command \"/usr/local/bin/node\" \"/Users/acrazing/bin/typings\" \"bundle\" \"-G\" \"-o\" \"bundle.d.ts\"\r\ntypings ERR! node -v v5.6.0\r\ntypings ERR! typings -v 1.3.3\r\n\r\ntypings ERR! If you need help, you may report this error at:\r\ntypings ERR!   <https://github.com/typings/typings/issues>\r\n```\r\n\r\n---\r\n\r\n```bash\r\nnpm --version && tsc --version && typings --version\r\n# output\r\n3.6.0\r\nVersion 1.8.10\r\n1.3.3\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/typings/typings/issues/comments/249392462","html_url":"https://github.com/typings/typings/issues/698#issuecomment-249392462","issue_url":"https://api.github.com/repos/typings/typings/issues/698","id":249392462,"user":{"login":"blakeembrey","id":1088987,"avatar_url":"https://avatars.githubusercontent.com/u/1088987?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeembrey","html_url":"https://github.com/blakeembrey","followers_url":"https://api.github.com/users/blakeembrey/followers","following_url":"https://api.github.com/users/blakeembrey/following{/other_user}","gists_url":"https://api.github.com/users/blakeembrey/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeembrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeembrey/subscriptions","organizations_url":"https://api.github.com/users/blakeembrey/orgs","repos_url":"https://api.github.com/users/blakeembrey/repos","events_url":"https://api.github.com/users/blakeembrey/events{/privacy}","received_events_url":"https://api.github.com/users/blakeembrey/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T23:05:57Z","updated_at":"2016-09-24T23:05:57Z","body":"It'll do this for any dependency you specify and there's no definition. It's the most straightforward way to verify the dependencies are correct when bundling. The other solution would be to throw during the compilation step for missing dependencies, this is just how it was implemented initially."}}
{"actor":{"display_login":"blakeembrey"}}