Skip to content

TypeError: process.getuid is not a function #963

@rseeberg

Description

@rseeberg

Describe the bug

When building on a windows machine, the build fails due to recent changes to the bin/cli.js
error is following:

TypeError: process.getuid is not a function
C:\Projects.....\node_modules\webpack-cli\bin\cli.js:356
if (!e && fileOwnerId === process.getuid()) utimesSync(openCollectivePath, now, now);'

What is the current behavior?

It relies on process.getuid which is not available on windows.

To Reproduce

Should be enough to run a build on a windows system.

Expected behavior

Expecting to work on windows

Additional context

Should probably revert the change done in comit
de41351#diff-22d5d2b57c69d2e1ac054c4d0f744ff1

Alternatively, find a way to not rely on a non windows available function.
Documentation from node
https://nodejs.org/api/process.html#process_process_getuid

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