Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.env.PWD undefined on windows #18

Open
Oza94 opened this issue Feb 23, 2017 · 0 comments
Open

process.env.PWD undefined on windows #18

Oza94 opened this issue Feb 23, 2017 · 0 comments

Comments

@Oza94
Copy link

Oza94 commented Feb 23, 2017

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();
}
nikclayton added a commit to nikclayton/sugar that referenced this issue Oct 1, 2019
process.env.PWD does not exist on Windows.

See, e.g., mrblueblue/gettext-loader#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant