Skip to content

Windows support #1

Description

@cjblomqvist

The separator is hard-coded as '/' but in reality, node also supports windows which has '' as default separator (see http://nodejs.org/api/path.html#path_path_sep ). This should be automatically detected and all fns that split things up depending upon the separator should should the os-proper separator.

Activity

  1. cjblomqvist commented on Dec 12, 2014

    @cjblomqvist
    Author

    I've been digging some more into this and come to the following conclusion:

    • It's easy to add windows support. It's just a matter of getting the full path.js from the joyent/node -repo (dunno if it works in all browsers then but it seemed to work for me anyway)
    • However, browserify's process dependency does not include the process.platform var, because it's just a plain js-file not processed.
    • Thus, it doesn't work anyway because path.js wouldn't recognize the platform

    Is it possible to get the process.platform to get set using some kind of preprocessing on the process lib used? Any help is greatly appreciated! If I get a few pointers I'll happily make PRs where appropriate to make everything work for both platforms (nix/windows).

  2. cjblomqvist commented on Dec 12, 2014

    @cjblomqvist
    Author

    See the reference for a workaround.

  3. Nantris commented on Jan 15, 2022

    @Nantris

    Windows support would be an enormous help for users trying to maintain cross-platform code. This is literally issue #1 - it would be so good to see support for this.

  4. chopin2256 commented on Jun 29, 2023

    @chopin2256

    Oh whoops, just posted this: #31

    The module is unusable for Windows users until this is resolved.

  5. dismantl commented on Dec 15, 2024

    @dismantl

    FYI I published a version of this package that includes the win32 functions and is up-to-date with the latest Node.js 23.4 API: https://github.com/dismantl/path-browserify-win32

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions