Skip to content

process.env.PWD undefined on windows #18

Description

@Oza94

Hello,

The process.env.PWD is used at least 3 times in this project. On my work machine (Windows 7, node v6) this variable is undefined and cause an error with webpack (Module build failed. Type Error: Path must be a string. Received undefined from src/utils/buildMessageBlocks.js#L21).

I think the way to go is to use process.cwd() which will always return a value although not the same thing as PWD.

Here is my quickfix at the top of my webpack.config.json waiting for a fix for those interested

if (!process.env.PWD) {
  process.env.PWD = process.cwd();
}

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