{"action":"closed","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/2132","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/2132/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/2132/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/2132/events","html_url":"https://github.com/rollup/rollup/issues/2132","id":315302974,"number":2132,"title":"var inherit = require$$0.util.inherit; TypeError: Cannot read property 'inherit' of undefined","user":{"login":"kendrickkesley","id":14907878,"avatar_url":"https://avatars0.githubusercontent.com/u/14907878?v=4","gravatar_id":"","url":"https://api.github.com/users/kendrickkesley","html_url":"https://github.com/kendrickkesley","followers_url":"https://api.github.com/users/kendrickkesley/followers","following_url":"https://api.github.com/users/kendrickkesley/following{/other_user}","gists_url":"https://api.github.com/users/kendrickkesley/gists{/gist_id}","starred_url":"https://api.github.com/users/kendrickkesley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kendrickkesley/subscriptions","organizations_url":"https://api.github.com/users/kendrickkesley/orgs","repos_url":"https://api.github.com/users/kendrickkesley/repos","events_url":"https://api.github.com/users/kendrickkesley/events{/privacy}","received_events_url":"https://api.github.com/users/kendrickkesley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-18T02:06:28Z","updated_at":"2018-05-14T14:07:07Z","closed_at":"2018-05-14T14:07:07Z","author_association":"NONE","body":"Hello, I'm using rollup to deploy my application to aws lambda\r\n\r\nThe rollup command run without an error (but there were circular dependency from aws-sdk)\r\n\r\nhere's my rollup config\r\n\r\n```\r\nimport resolve from 'rollup-plugin-node-resolve';\r\nimport commonjs from 'rollup-plugin-commonjs';\r\nimport json from 'rollup-plugin-json';\r\nimport nodeBuiltins from 'rollup-plugin-node-builtins';\r\n\r\nexport default [\r\n    {\r\n        input: './dist/handler.js',\r\n        output: {\r\n            file: './src/handler.js',\r\n            format: 'cjs'\r\n        },\r\n        treeshake: false,\r\n        plugins: [ \r\n            nodeBuiltins(),\r\n            json(),\r\n            resolve(),\r\n            commonjs(),\r\n        ]\r\n    }\r\n];\r\n```\r\n\r\nevery time I tried running `node ./dist/handler.js` it always gives me `TypeError: Cannot read property 'inherit' of undefined` because of `var inherit = require$$0.util.inherit`\r\n\r\nI also get this warning in the console\r\n```\r\n(!) Missing exports\r\nhttps://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module\r\n commonjs-proxy:C:\\xampp\\htdocs\\go\\src\\bitbucket.org\\psychpress\\golang-docx-report-serverless\\node_modules\\buffer-es6\\index.js\r\ndefault is not exported by node_modules\\buffer-es6\\index.js\r\n1: import * as bufferEs6 from \"C:\\\\xampp\\\\htdocs\\\\go\\\\src\\\\bitbucket.org\\\\psychpress\\\\golang-docx-report-serverless\\\\node_modules\\\\buffer-es6\\\\index.js\"; export default ( bufferEs6 && bufferEs6['default'] ) || bufferEs6;\r\n```\r\n\r\nand here's the full circular dependency warning. if it's not relevant, I can get rid of this\r\n```\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\json.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\json.js -> node_modules\\aws-sdk\\lib\\json\\builder.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\json.js -> node_modules\\aws-sdk\\lib\\json\\builder.js ->  commonjs-proxy:C:\\xampp\\htdocs\\go\\src\\bitbucket.org\\psychpress\\golang-docx-report-serverless\\node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\json.js -> node_modules\\aws-sdk\\lib\\json\\parser.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\query.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\query.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\query.js -> node_modules\\aws-sdk\\lib\\query\\query_param_serializer.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\query.js -> node_modules\\aws-sdk\\lib\\model\\shape.js -> node_modules\\aws-sdk\\lib\\model\\collection.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\query.js -> node_modules\\aws-sdk\\lib\\model\\shape.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\query.js ->  commonjs-proxy:C:\\xampp\\htdocs\\go\\src\\bitbucket.org\\psychpress\\golang-docx-report-serverless\\node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\rest.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\rest_json.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\rest_xml.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\protocol\\rest_xml.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\xml\\builder.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLElement.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLElement.js ->  commonjs-proxy:C:\\xampp\\htdocs\\go\\src\\bitbucket.org\\psychpress\\golang-docx-report-serverless\\node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLCData.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLComment.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLDeclaration.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLDeclaration.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLRaw.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLNode.js -> node_modules\\xmlbuilder\\lib\\XMLText.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js\r\n(!) Circular dependency: node_modules\\xmlbuilder\\lib\\XMLDeclaration.js -> node_modules\\xmlbuilder\\lib\\XMLNode.js ->  commonjs-proxy:C:\\xampp\\htdocs\\go\\src\\bitbucket.org\\psychpress\\golang-docx-report-serverless\\node_modules\\xmlbuilder\\lib\\XMLDeclaration.js -> node_modules\\xmlbuilder\\lib\\XMLDeclaration.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\model\\api.js -> node_modules\\aws-sdk\\lib\\model\\operation.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\model\\api.js -> node_modules\\aws-sdk\\lib\\model\\paginator.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\model\\api.js -> node_modules\\aws-sdk\\lib\\model\\resource_waiter.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\model\\api.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\service.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\util.js -> node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\service.js -> node_modules\\aws-sdk\\lib\\region_config.js -> node_modules\\aws-sdk\\lib\\util.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\config.js\r\n-> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\config.js\r\n-> node_modules\\aws-sdk\\lib\\credentials.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\config.js\r\n-> node_modules\\aws-sdk\\lib\\credentials\\credential_provider_chain.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\http.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\sequential_executor.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\event_listeners.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\request.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\response.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\resource_waiter.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\v2.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\v3.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\v3https.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\v4.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\v4.js -> node_modules\\aws-sdk\\lib\\signers\\v4_credentials.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\s3.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\signers\\request_signer.js -> node_modules\\aws-sdk\\lib\\signers\\presign.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\core.js -> node_modules\\aws-sdk\\lib\\param_validator.js -> node_modules\\aws-sdk\\lib\\core.js\r\n(!) Circular dependency: node_modules\\rollup-plugin-node-builtins\\src\\es6\\readable-stream\\duplex.js -> node_modules\\rollup-plugin-node-builtins\\src\\es6\\readable-stream\\readable.js -> node_modules\\rollup-plugin-node-builtins\\src\\es6\\readable-stream\\duplex.js\r\n(!) Circular dependency: node_modules\\rollup-plugin-node-builtins\\src\\es6\\readable-stream\\duplex.js -> node_modules\\rollup-plugin-node-builtins\\src\\es6\\readable-stream\\writable.js -> node_modules\\rollup-plugin-node-builtins\\src\\es6\\readable-stream\\duplex.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\node_loader.js -> node_modules\\aws-sdk\\lib\\credentials\\temporary_credentials.js -> node_modules\\aws-sdk\\clients\\sts.js -> node_modules\\aws-sdk\\lib\\node_loader.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\node_loader.js -> node_modules\\aws-sdk\\lib\\credentials\\temporary_credentials.js -> node_modules\\aws-sdk\\clients\\sts.js ->  commonjs-proxy:C:\\xampp\\htdocs\\go\\src\\bitbucket.org\\psychpress\\golang-docx-report-serverless\\node_modules\\aws-sdk\\lib\\node_loader.js -> node_modules\\aws-sdk\\lib\\node_loader.js\r\n(!) Circular dependency: node_modules\\aws-sdk\\lib\\node_loader.js -> node_modules\\aws-sdk\\lib\\credentials\\cognito_identity_credentials.js -> node_modules\\aws-sdk\\clients\\cognitoidentity.js -> node_modules\\aws-sdk\\lib\\node_loader.js\r\n```\r\n\r\nand here's my package.json\r\n```\r\n{\r\n  \"name\": \"test project\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"\",\r\n  \"dependencies\": {\r\n    \"aws-sdk\": \"^2.224.1\",\r\n    \"hashids\": \"^1.1.4\",\r\n    \"moment\": \"^2.22.1\",\r\n    \"mysql2\": \"^1.5.3\",\r\n    \"pdfmake\": \"^0.1.36\",\r\n    \"sequelize\": \"^4.37.6\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"rollup-plugin-commonjs\": \"^9.1.0\",\r\n    \"rollup-plugin-json\": \"^2.3.0\",\r\n    \"rollup-plugin-node-builtins\": \"^2.1.2\",\r\n    \"rollup-plugin-node-resolve\": \"^3.3.0\",\r\n    \"serverless-plugin-encrypted\": \"^1.0.6\"\r\n  },\r\n  \"scripts\": {\r\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\r\n  },\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\"\r\n}\r\n```"}}
{"actor":{"display_login":"guybedford"}}