{"action":"created","issue":{"url":"https://api.github.com/repos/verdaccio/verdaccio/issues/560","repository_url":"https://api.github.com/repos/verdaccio/verdaccio","labels_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/560/labels{/name}","comments_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/560/comments","events_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/560/events","html_url":"https://github.com/verdaccio/verdaccio/issues/560","id":295776269,"node_id":"MDU6SXNzdWUyOTU3NzYyNjk=","number":560,"title":"weird express error (ERR_HTTP_HEADERS_SENT)","user":{"login":"p3x-robot","id":28588124,"node_id":"MDQ6VXNlcjI4NTg4MTI0","avatar_url":"https://avatars0.githubusercontent.com/u/28588124?v=4","gravatar_id":"","url":"https://api.github.com/users/p3x-robot","html_url":"https://github.com/p3x-robot","followers_url":"https://api.github.com/users/p3x-robot/followers","following_url":"https://api.github.com/users/p3x-robot/following{/other_user}","gists_url":"https://api.github.com/users/p3x-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/p3x-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p3x-robot/subscriptions","organizations_url":"https://api.github.com/users/p3x-robot/orgs","repos_url":"https://api.github.com/users/p3x-robot/repos","events_url":"https://api.github.com/users/p3x-robot/events{/privacy}","received_events_url":"https://api.github.com/users/p3x-robot/received_events","type":"User","site_admin":false},"labels":[{"id":638038595,"node_id":"MDU6TGFiZWw2MzgwMzg1OTU=","url":"https://api.github.com/repos/verdaccio/verdaccio/labels/waiting-user-feedback","name":"waiting-user-feedback","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-09T07:17:51Z","updated_at":"2018-10-15T11:46:59Z","closed_at":"2018-02-16T08:43:22Z","author_association":"NONE","body":"#### My reason:\r\n\r\nweird express error (ERR_HTTP_HEADERS_SENT)\r\n<!-- \r\n\ta brief explanation of the issue, suggestion, feature\r\n-->\r\n\r\n#### Steps to reproduce:\r\n\r\nlatst verdaccio\r\n<!-- \r\n\t(if it applies)\r\n\thow can I do in order to reproduce it? environment? \r\n-->\r\n####  App Version:\t\r\n<!-- \r\n      Define which version the issue happens and whether previous version the behaviour is correct\r\n-->\r\n\r\n```text\r\nroot@server:~# verdaccio --version\r\nVerdaccio doesn't need superuser privileges. Don't run it under root.\r\n2.7.4\r\n```\r\n\r\nI am not using ```root```.\r\n\r\n####  Config file:\t\r\n<!-- \r\n      Provide your config file might be really helpful. Please be aware to hide sensisive data before post.\r\n-->\r\n\r\n```yml\r\n#\r\n# This is the default config file. It allows all users to do anything,\r\n# so don't use it on production systems.\r\n#\r\n# Look here for more config file examples:\r\n# https://github.com/verdaccio/verdaccio/tree/master/conf\r\n#\r\n\r\n# path to a directory with all packages\r\nstorage: /var/npm/storage\r\n\r\nauth:\r\n  htpasswd:\r\n    file: ./htpasswd\r\n    # Maximum amount of users allowed to register, defaults to \"+inf\".\r\n    # You can set this to -1 to disable registration.\r\n    #max_users: 1000\r\n\r\n# a list of other known repositories we can talk to\r\nuplinks:\r\n  npmjs:\r\n    url: https://registry.npmjs.org/\r\n#    url: https://registry.yarnpkg.com\r\n\r\npackages:\r\n  '@*/*':\r\n    # scoped packages\r\n    access: $all\r\n#    access: $authenticated\r\n    publish: $authenticated\r\n    proxy: npmjs\r\n\r\n  '**':\r\n    # allow all users (including non-authenticated users) to read and\r\n    # publish all packages\r\n    #\r\n    # you can specify usernames/groupnames (depending on your auth plugin)\r\n    # and three keywords: \"$all\", \"$anonymous\", \"$authenticated\"\r\n#    access: $authenticated\r\n    access: $all\r\n\r\n    # allow all known users to publish packages\r\n    # (anyone can register by default, remember?)\r\n    publish: $authenticated\r\n\r\n    # if package is not available locally, proxy requests to 'npmjs' registry\r\n    proxy: npmjs\r\n\r\n# log settings\r\nlogs:\r\n#  - {type: stdout, format: pretty, level: http}\r\n  - {type: file, format: pretty, path: /var/log/verdaccio.log, level: http }\r\n\r\nurl_prefix: https://npm.patrikx3.com/\r\n\r\nlisten:\r\n# - localhost:4873            # default value\r\n# - http://localhost:4873     # same thing\r\n - 0.0.0.0:4873              # listen on all addresses (INADDR_ANY)\r\n# - https://example.org:4873  # if you want to use https\r\n# - [::1]:4873                # ipv6\r\n# - unix:/tmp/verdaccio.sock    # unix socket\r\n````\r\n\r\n\r\n#### Additional information:\r\n\r\n<!--\r\n\tprovide the following information would be helpful\r\n-->\r\n\r\n```text\r\nFeb 02 17:26:39 server systemd[1]: Started p3x-npm.\r\nFeb 02 17:26:42 server verdaccio[696]:  warn --- config file  - /var/npm/config.yaml\r\nFeb 09 08:04:39 server verdaccio[696]: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client\r\nFeb 09 08:04:39 server verdaccio[696]:     at validateHeader (_http_outgoing.js:503:11)\r\nFeb 09 08:04:39 server verdaccio[696]:     at ServerResponse.setHeader (_http_outgoing.js:510:3)\r\nFeb 09 08:04:39 server verdaccio[696]:     at ServerResponse.header (/usr/lib/node_modules/verdaccio/node_modules/express/lib/response.js:767:10)\r\nFeb 09 08:04:39 server verdaccio[696]:     at ServerResponse.send (/usr/lib/node_modules/verdaccio/node_modules/express/lib/response.js:170:12)\r\nFeb 09 08:04:39 server verdaccio[696]:     at module.exports.final (/usr/lib/node_modules/verdaccio/src/api/web/middleware.js:169:7)\r\nFeb 09 08:04:39 server verdaccio[696]:     at Layer.handle_error (/usr/lib/node_modules/verdaccio/node_modules/express/lib/router/layer.js:71:5)\r\nFeb 09 08:04:39 server verdaccio[696]:     at trim_prefix (/usr/lib/node_modules/verdaccio/node_modules/express/lib/router/index.js:315:13)\r\nFeb 09 08:04:39 server verdaccio[696]:     at /usr/lib/node_modules/verdaccio/node_modules/express/lib/router/index.js:284:7\r\nFeb 09 08:04:39 server verdaccio[696]:     at Function.process_params (/usr/lib/node_modules/verdaccio/node_modules/express/lib/router/index.js:335:12)\r\nFeb 09 08:04:39 server verdaccio[696]:     at next (/usr/lib/node_modules/verdaccio/node_modules/express/lib/router/index.js:275:10)\r\n```\r\n\t\r\n - `$ set DEBUG=express:* verdaccio` enable extreme verdaccio debug mode\r\n - `$ npm --verbose` prints:\r\n\r\n```text\r\nnpm info it worked if it ends with ok\r\nnpm verb cli [ '/usr/bin/node', '/usr/bin/npm', '--verbose' ]\r\nnpm info using npm@5.6.0\r\nnpm info using node@v9.5.0\r\nnpm verb config Skipping project config: /root/.npmrc. (matches userconfig)\r\n\r\nUsage: npm <command>\r\n\r\nwhere <command> is one of:\r\n    access, adduser, bin, bugs, c, cache, completion, config,\r\n    ddp, dedupe, deprecate, dist-tag, docs, doctor, edit,\r\n    explore, get, help, help-search, i, init, install,\r\n    install-test, it, link, list, ln, login, logout, ls,\r\n    outdated, owner, pack, ping, prefix, profile, prune,\r\n    publish, rb, rebuild, repo, restart, root, run, run-script,\r\n    s, se, search, set, shrinkwrap, star, stars, start, stop, t,\r\n    team, test, token, tst, un, uninstall, unpublish, unstar,\r\n    up, update, v, version, view, whoami\r\n\r\nnpm <command> -h     quick help on <command>\r\nnpm -l           display full usage info\r\nnpm help <term>  search for help on <term>\r\nnpm help npm     involved overview\r\n\r\nSpecify configs in the ini-formatted file:\r\n    /root/.npmrc\r\nor on the command line via: npm <command> --key value\r\nConfig info can be viewed via: npm help config\r\n\r\nnpm@5.6.0 /usr/lib/node_modules/npm\r\n```\r\n\r\n - `$ npm config get registry` prints:\r\n```https://npm.patrikx3.com/```\r\n\r\n - Verdaccio terminal output\r\n - Windows, OS X/macOS, or Linux?: \r\n```Linux server 4.12.0-2-amd64 #1 SMP Debian 4.12.13-1 (2017-09-19) x86_64 GNU/Linux```\r\n\r\n - Verdaccio configuration file, eg: `cat ~/.config/verdaccio/config.yaml`\r\n\r\n```yml\r\n#\r\n# This is the default config file. It allows all users to do anything,\r\n# so don't use it on production systems.\r\n#\r\n# Look here for more config file examples:\r\n# https://github.com/verdaccio/verdaccio/tree/master/conf\r\n#\r\n\r\n# path to a directory with all packages\r\nstorage: /var/npm/storage\r\n\r\nauth:\r\n  htpasswd:\r\n    file: ./htpasswd\r\n    # Maximum amount of users allowed to register, defaults to \"+inf\".\r\n    # You can set this to -1 to disable registration.\r\n    #max_users: 1000\r\n\r\n# a list of other known repositories we can talk to\r\nuplinks:\r\n  npmjs:\r\n    url: https://registry.npmjs.org/\r\n#    url: https://registry.yarnpkg.com\r\n\r\npackages:\r\n  '@*/*':\r\n    # scoped packages\r\n    access: $all\r\n#    access: $authenticated\r\n    publish: $authenticated\r\n    proxy: npmjs\r\n\r\n  '**':\r\n    # allow all users (including non-authenticated users) to read and\r\n    # publish all packages\r\n    #\r\n    # you can specify usernames/groupnames (depending on your auth plugin)\r\n    # and three keywords: \"$all\", \"$anonymous\", \"$authenticated\"\r\n#    access: $authenticated\r\n    access: $all\r\n\r\n    # allow all known users to publish packages\r\n    # (anyone can register by default, remember?)\r\n    publish: $authenticated\r\n\r\n    # if package is not available locally, proxy requests to 'npmjs' registry\r\n    proxy: npmjs\r\n\r\n# log settings\r\nlogs:\r\n#  - {type: stdout, format: pretty, level: http}\r\n  - {type: file, format: pretty, path: /var/log/verdaccio.log, level: http }\r\n\r\nurl_prefix: https://npm.patrikx3.com/\r\n\r\nlisten:\r\n# - localhost:4873            # default value\r\n# - http://localhost:4873     # same thing\r\n - 0.0.0.0:4873              # listen on all addresses (INADDR_ANY)\r\n# - https://example.org:4873  # if you want to use https\r\n# - [::1]:4873                # ipv6\r\n# - unix:/tmp/verdaccio.sock    # unix socket\r\n````\r\n\r\n <!-- Remove those does not apply for you -->\r\n - Container:\r\n   - I use local environment: **TRUE**\r\n   - I develop / deploy using Docker.: **NOPE**\r\n   - I deploy to a PaaS. : **NOPE**\r\n\r\n#### Additional verbose log:\r\n"},"comment":{"url":"https://api.github.com/repos/verdaccio/verdaccio/issues/comments/429820255","html_url":"https://github.com/verdaccio/verdaccio/issues/560#issuecomment-429820255","issue_url":"https://api.github.com/repos/verdaccio/verdaccio/issues/560","id":429820255,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTgyMDI1NQ==","user":{"login":"tfrijsewijk","id":9696261,"node_id":"MDQ6VXNlcjk2OTYyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/9696261?v=4","gravatar_id":"","url":"https://api.github.com/users/tfrijsewijk","html_url":"https://github.com/tfrijsewijk","followers_url":"https://api.github.com/users/tfrijsewijk/followers","following_url":"https://api.github.com/users/tfrijsewijk/following{/other_user}","gists_url":"https://api.github.com/users/tfrijsewijk/gists{/gist_id}","starred_url":"https://api.github.com/users/tfrijsewijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfrijsewijk/subscriptions","organizations_url":"https://api.github.com/users/tfrijsewijk/orgs","repos_url":"https://api.github.com/users/tfrijsewijk/repos","events_url":"https://api.github.com/users/tfrijsewijk/events{/privacy}","received_events_url":"https://api.github.com/users/tfrijsewijk/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T11:46:59Z","updated_at":"2018-10-15T11:46:59Z","author_association":"NONE","body":">root@server:~# verdaccio --version\r\nVerdaccio doesn't need superuser privileges. Don't run it under root.\r\n2.7.4\r\nI am not using root.\r\n\r\nYes you are, look at the **#**. You are running the command _as root_. You'd have a dollar sign **$** if you're NOT root"}}
{"actor":{"display_login":"tfrijsewijk"}}