{"action":"created","issue":{"url":"https://api.github.com/repos/heartsucker/node-deb/issues/32","repository_url":"https://api.github.com/repos/heartsucker/node-deb","labels_url":"https://api.github.com/repos/heartsucker/node-deb/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/heartsucker/node-deb/issues/32/comments","events_url":"https://api.github.com/repos/heartsucker/node-deb/issues/32/events","html_url":"https://github.com/heartsucker/node-deb/issues/32","id":210039417,"number":32,"title":"Spurious error printout","user":{"login":"vidstige","id":655605,"avatar_url":"https://avatars.githubusercontent.com/u/655605?v=3","gravatar_id":"","url":"https://api.github.com/users/vidstige","html_url":"https://github.com/vidstige","followers_url":"https://api.github.com/users/vidstige/followers","following_url":"https://api.github.com/users/vidstige/following{/other_user}","gists_url":"https://api.github.com/users/vidstige/gists{/gist_id}","starred_url":"https://api.github.com/users/vidstige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vidstige/subscriptions","organizations_url":"https://api.github.com/users/vidstige/orgs","repos_url":"https://api.github.com/users/vidstige/repos","events_url":"https://api.github.com/users/vidstige/events{/privacy}","received_events_url":"https://api.github.com/users/vidstige/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-24T12:42:56Z","updated_at":"2017-02-24T12:51:18Z","closed_at":"2017-02-24T12:51:18Z","body":"I'm getting a spurios error printout whe installing my package using `dpkg --install myapp_0.3.15_all.deb`\r\n\r\nSee below\r\n\r\n```\r\n(Reading database ... 178426 files and directories currently installed.)\r\nPreparing to unpack myapp_0.3.15_all.deb ...\r\nRemoved symlink /etc/systemd/system/multi-user.target.wants/myapp.service.\r\nFailed to stop myapp.service\\x7d.service: Unit myapp.service\\x7d.service not loaded.\r\nmyapp wasn't even running!\r\nUnpacking myapp (0.3.15) over (0.3.14) ...\r\nSetting up myapp (0.3.15) ...\r\nDirectory 'node_modules' exists. Running 'npm rebuild'\r\n\r\n> websocket@1.0.24 install /usr/share/myapp/app/node_modules/websocket\r\n> (node-gyp rebuild 2> builderror.log) || (exit 0)\r\n\r\nsh: 1: cannot create builderror.log: Permission denied\r\nminimist@1.2.0 /usr/share/myapp/app/node_modules/minimist\r\nwebsocket@1.0.24 /usr/share/myapp/app/node_modules/websocket\r\ndebug@2.6.1 /usr/share/myapp/app/node_modules/websocket/node_modules/debug\r\nms@0.7.2 /usr/share/myapp/app/node_modules/websocket/node_modules/debug/node_modules/ms\r\nnan@2.5.1 /usr/share/myapp/app/node_modules/websocket/node_modules/nan\r\ntypedarray-to-buffer@3.1.2 /usr/share/myapp/app/node_modules/websocket/node_modules/typedarray-to-buffer\r\nis-typedarray@1.0.0 /usr/share/myapp/app/node_modules/websocket/node_modules/typedarray-to-buffer/node_modules/is-typedarray\r\nyaeti@0.0.6 /usr/share/myapp/app/node_modules/websocket/node_modules/yaeti\r\nnode-deb@0.5.0 /usr/share/myapp/app/node_modules/node-deb\r\nCreated symlink from /etc/systemd/system/multi-user.target.wants/myapp.service to /etc/systemd/system/myapp.service.\r\n```\r\n\r\nNote the `sh: 1: cannot create builderror.log: Permission denied`. What is it trying to build? Why can't it write to the log, etc. Everything seems to work fine in spite of this error message. Normally I try to build things so that no errors are emitted when everything works as expected. Please advice.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/heartsucker/node-deb/issues/comments/282283894","html_url":"https://github.com/heartsucker/node-deb/issues/32#issuecomment-282283894","issue_url":"https://api.github.com/repos/heartsucker/node-deb/issues/32","id":282283894,"user":{"login":"heartsucker","id":3998464,"avatar_url":"https://avatars.githubusercontent.com/u/3998464?v=3","gravatar_id":"","url":"https://api.github.com/users/heartsucker","html_url":"https://github.com/heartsucker","followers_url":"https://api.github.com/users/heartsucker/followers","following_url":"https://api.github.com/users/heartsucker/following{/other_user}","gists_url":"https://api.github.com/users/heartsucker/gists{/gist_id}","starred_url":"https://api.github.com/users/heartsucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heartsucker/subscriptions","organizations_url":"https://api.github.com/users/heartsucker/orgs","repos_url":"https://api.github.com/users/heartsucker/repos","events_url":"https://api.github.com/users/heartsucker/events{/privacy}","received_events_url":"https://api.github.com/users/heartsucker/received_events","type":"User","site_admin":false},"created_at":"2017-02-24T12:51:18Z","updated_at":"2017-02-24T12:51:18Z","body":"When you do a `dpkg --install`, it runs the pre-packaged Debian maintainer scripts you can find in the directory `templates`.  In this case, the [postrm](https://github.com/heartsucker/node-deb/blob/develop/templates/postinst#L71-L82) script runs either `npm rebuild --production` (as in your example) or `npm install --production`. The `node-gyp` tool is building the native extensions from your dependency `websocket` (or so it appears).\r\n\r\nSo this error.\r\n\r\n```\r\nsh: 1: cannot create builderror.log: Permission denied\r\n```\r\n\r\nComes from a third party tool. I'm not sure why there's a permission denied since you're running this as `root`.\r\n\r\nI'm making this a closed since I'm fairly sure it's not an issue with `node-deb` itself, but i you have evidence to the contrary, feel free to reopen it."}}
{"actor":{"display_login":"heartsucker"}}