gettext-loader icon indicating copy to clipboard operation
gettext-loader copied to clipboard

process.env.PWD undefined on windows

Open Oza94 opened this issue 8 years ago • 0 comments

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();
}

Oza94 avatar Feb 23 '17 12:02 Oza94