Need help using Yarn ("yarn redwood dev" command not working)

I am currently stuck because using the yarn redwood dev command returns the following…


I’m new to using Yarn but I’m pretty sure I have it installed correctly and the environment variable was added to PATH for it.

Has anybody else ran into this or think they can help me troubleshoot my issue?

Thanks,

Chris

I can’t see everything there, but looks like it can’t find the node modules. Have you tried just first typing yarn install to make sure all the dependencies are set up?

More docs here: https://classic.yarnpkg.com/en/docs/installing-dependencies/

1 Like

Hmm, is the directory name really ,,,Local Dev with three commas like that? My first guess is that our path lookup stuff is blowing up on that.

Can you try creating your app in another directory, like C:\Users\Owner\test or something?

I’m pretty sure that the yarn create redwood-app ./redwoodblog command does that for me but I went ahead and tried it anyway and it made no difference. :neutral_face:

@cmarabate (sorry for the inundation right now) From your Redwood directory, could you also run yarn rw info and past the output here? Thanks!

Yes, I don’t like it either but I needed a way have it be listed at the top of my user’s directory. I normally use an exclamation mark for this but this folder has a bunch of folders that start with a period so I originally used ... but that caused issues with other things so I had to start using comma’s instead.

Is there a better way for me to make a folder always appear at the top of a directory?

Regardless, I created the following directory and started over…
C:\Users\Owner\Local Redwood Dev

But I still had the same problem, so I figured it must not like spaces and I was right because the following worked…
C:\Users\Owner\redwood-dev

Thanks a bunch!

Yes, most often underscores, e.g. _, are used for this type of manual directory sorting!

Glad to hear it’s working! And thanks for letting us know about the issue with using spaces, which is something we thought we’d fixed for Windows. Will double check what’s going on there.

1 Like

Duh, why didn’t I think of that! :rofl: thanks!

Actually I think I did, because I just tried it again and _ appears under . :disappointed:

I’m glad I was able to bring the issue with spaces on Windows issue to your attention! :grinning:

1 Like

@peterp Take a look at the image in the first message of this topic --> I thought we previously fixed the issue for Windows when spaces exist in path. Y/n/maybe? :thinking:

I did check to confirm we are using path.join() in the “dev” command.

1 Like

Hi @cmarabate Could you please confirm two things for us?

  1. from your App directory, run this command and paste the output here:
    yarn rw info

  2. you are using Powershell (per image above), correct?

  1. Sorry but I already stopped using a directory name that has spaces in it and I deleted my redwood site. Do you need me to try installing it again in a directory with spaces in the name?
  2. Yes, I was using PowerShell.
1 Like
  1. No need at all! The yarn rw info provides information about your system, which helps us diagnose errors. Running it from any installed Redwood directory will work. No pressure here if you’ve moved on — your help so far is very appreciated.
  2. Got it. Thanks!

I redownloaded the redwoodjs/example-blog into a folder in my old dev directory which has a space in it.

Then I followed the instructions in the README and I had the same issue when I used the “yarn redwood dev”.

Then I ran “yarn rw info” for you in both Command Prompt and PowerShell and this is what it returned…

Then I started over in my new Dev directory that doesn’t have a space in it, and everything worked flawlessly!

I hope that helps!

1 Like

I went further with the instructions on https://github.com/redwoodjs/example-blog and I got stuck at the following part…

Back to your local development machine, head to http://localhost:8910/admin and you’ll be prompted with the login popup. Enter the URL that you just copied and click Set site’s URL :

That is not what I see when I visit that page, I see this instead…


And clicking the “Signed in” link does nothing.

What could I have done wrong?

Nevermind, I edited the wrong .env file. I edited the one in my dev directory that has a space in it.

But now I have a new problem…

I was able to do everything in the instruction on https://github.com/redwoodjs/example-blog but that only allowed me to login locally. Wasn;t this also supposed to deploy the site to Netlify?

Even though the instructions didn’t say to, I ran the following commands after finishing everything in the instructions…

I’m not sure what I did wrong but this is not the way I am used to deploying to Netlify. I normally would create a GitHub repo for the site and deploy it to Netlify using the git repo. Will this still work or is there some special reason it won’t work like that with redwood?

Hi @cmarabate Thanks again for walking us through these issues. And sorry you’ve been running into so many of them!

Spaces in path causing error with yarn rw dev

I have opened a new issue here:

Deployment to Netlify

From the “Deployment” section of the Tutorial:

Before we continue, make sure your app is fully committed and pushed to GitHub, GitLab, or Bitbucket. We’re going to link Netlify directly to our git repo so that a simple push to master will re-deploy our site.

We do recommend creating a GitHub (or like-kind) repository to connect to Netlify. It’s much easier that way!

Lastly, it would be possible to deploy to Netlify from the command line. But there was (yet another) Windows specific issue when running the build command. The good news is that this is now fixed and will be available in our next release!

1 Like

Sure thing, I am happy to help :grinning:. No problem about me running into so many issues, it was expected and it has taught me a thing or two.

Spaces in path causing error with yarn rw dev

I agree that the space issue needs to be fixed but it no longer concerns me because I will never use spaces or special characters aside from underscore for any of my dev folders :grinning:.

Deployment to Netlify

Cool, I will just do that instead :grinning:.

But if you remind me when the next release is available I would be happy to test out the command line method for ya.

1 Like

I got the same error. I closed the terminal and run the command yarn --force in git bash then all rw commands started to work again

1 Like

Interesting, as mentioned by David this seems resolved now. Running yarn rw dev on an app inside a folder that has whitespace “hello world” seem to be working on my end.

I am using Powershell on windows, I am guessing that may be important.

The special character one is still giving me error.

I tried creating a folder called “hello,world” and it gives me error.

Likely still related to parshing because I can see powershell itself having hiccups parsing the folder name.

If i just try to cd into hello, world without writing it inside “” powershell itself parses it incorrectly and throws an error.

image

1 Like