Skip to content

File exists: /usr/local/bin/serve #57

Description

@TimDaub

I've serve installed on my computer:

$ which serve
/usr/local/bin/serve

Hence, when I do npm i -g --only=prod https-localhost, I get an error during the installation:

npm i -g --only=prod https-localhost
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/https-localhost/index.js
npm ERR! dest /usr/local/bin/serve
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/https-localhost/index.js' -> '/usr/local/bin/serve'
npm ERR! File exists: /usr/local/bin/serve
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.npm/_logs/2021-01-11T17_01_48_121Z-debug.log

To me, it would make sense if the binary was called https-localhost or similar. Currently, it is called serve.

Activity

  1. added a commit that references this issue on Jan 11, 2021
    e5c32e1
  2. daquinoaldo commented on Jan 16, 2021

    @daquinoaldo
    Owner

    Hi @TimDaub,
    I agree to change the name for the same reason you spotted. I would change it to sserve since https-localhost it's a bit long. Anyway, it's a good idea to keep them both since it is possible.
    The problem with changing the name is that it's a breaking change. I scheduled it in v5, in which there are many other breaking changes.
    I'm running out of time in this period (sorry for the late answer btw). Would you like to contribute and help me in delivering this new version? I'm looking for both casual contributors and stable maintainers.

  3. TimDaub commented on Jan 19, 2021

    @TimDaub
    Author

    I would change it to sserve since https-localhost it's a bit long.

    I'm fine with sserve too, but consider that you might run into trouble in case you ever want to rename your library to that name: https://www.npmjs.com/package/sserve

    I'm running out of time in this period (sorry for the late answer btw). Would you like to contribute and help me in delivering this new version?

    I'm happy to help you resolve this issue here :)

  4. daquinoaldo commented on Jan 24, 2021

    @daquinoaldo
    Owner

    I'm happy to help you resolve this issue here :)

    The name change will be included in https-localhost v5.0.0. The plan for that version is a total refactor and a porting in TypeScript. As I said, I'm running out of time, and I don't really know when v5 will be out.

  5. ezekiel747 commented on Nov 12, 2022

    @ezekiel747

    Hi, just wanted to suggest a different command name than "serve", maybe "serve-https"?
    I've had this renaming done manually in the bin folder, since I need both the "serve" package and this one (awesome work, btw).
    Thanks.

    For now, if someone else needs to use both serve and https-localhost packages alternatively, just rename the symlinks.

    • npm i -g https-localhost
    • mv /usr/local/bin/serve /usr/local/bin/serve-https
      (or any other name that makes sense)
    • npm i -g serve
  6. TimDaub commented on Nov 12, 2022

    @TimDaub
    Author

    I ended up publishing ssl-serve which is a zero-config dev server for SSL connections, an old fork of zeit‘s serve. I don‘t really maintain it but it still works without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions