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

Unbound variable "PWD" on Windows #737

Closed
D3bo opened this issue Oct 18, 2023 · 9 comments
Closed

Unbound variable "PWD" on Windows #737

D3bo opened this issue Oct 18, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@D3bo
Copy link

D3bo commented Oct 18, 2023

Describe the bug
Same as #686 : got Unbound variable "PWD" when try yarn dev.
if I type $PWD on the terminal it output correctly the actual folder $PWD: C:\dev\blog\nextj-blog

work on my mac with node 16.14 and npm 8.3.1

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. Run Yarn
  3. Run Yarn dev
  4. See error

System Info (if dev / build issue):

  • OS: Windows 11
  • Node version 21
  • Npm version 10.2
@D3bo D3bo added the bug Something isn't working label Oct 18, 2023
@D3bo D3bo changed the title Unbound variable "PWD" on Windows+ Unbound variable "PWD" on Windows Oct 18, 2023
@timlrx
Copy link
Owner

timlrx commented Oct 18, 2023

you can set it manually by typing

export PWD="$(pwd)" 

Duplicate of #686

Seems like you are on Windows and might encounter this issue later on as well: #704

@D3bo
Copy link
Author

D3bo commented Oct 18, 2023

you can set it manually by typing

export PWD="$(pwd)" 

As I said the variable is already recognised by the terminal

@timlrx
Copy link
Owner

timlrx commented Oct 19, 2023

Ok will add to the documentation that you might have to define it on windows

@timlrx timlrx closed this as completed Oct 19, 2023
@dariusz-wozniak
Copy link
Contributor

Hi @timlrx - did you add that to the docs? I don't see any occurrence of the "PWD" in the readme. Thank you :)

@mischievouus
Copy link

you can set it manually by typing

export PWD="$(pwd)" 

Duplicate of #686

Seems like you are on Windows and might encounter this issue later on as well: #704

On windows it's set PWD="$(pwd)"

@jeffiscow2
Copy link

Im having the same problem in windows 11 and set PWD="$(pwd)" is not helping.

@loryvi
Copy link

loryvi commented Dec 29, 2023

Im having the same problem in windows 11 and set PWD="$(pwd)" is not helping.

same here. i've also tried doing the ./scripts/postContentlayer.mjs from #704, didn't work for me. Unbound variable "PWD" still shows on my terminal after running yarn dev.

@anshul360
Copy link

anshul360 commented Dec 30, 2023

I was able to fix issue by following:

OS: Win10 Home Edition

@RayRemnant
Copy link

In VS Code, on the top right corner of your terminal, press "+" and open a "Command Prompt".

Capture

My default was set to "Powershell" and I kept receiving the same error. Hope it helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants