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

Yarn build not working #1

Closed
jacobhweeks opened this issue May 14, 2021 · 4 comments
Closed

Yarn build not working #1

jacobhweeks opened this issue May 14, 2021 · 4 comments

Comments

@jacobhweeks
Copy link

Hello,

When I try to run yarn build as indicated in the instructions, I am presented with an [Errno 2] No such file or directory: 'build'

@jacobhweeks
Copy link
Author

Any help is greatly appreciated. I might have misunderstood something because it seems that yarn is used for testing apps. Should I not have run "sudo apt install yarn"?

@Lissy93
Copy link
Owner

Lissy93 commented May 15, 2021

Hi @jacobhweeks - thanks for raising this. I've not seen this error message before, and have been unable to recreate it. Here are a couple of things to try, if none of them work, then please provide more info, so that I can look into this for you.


Option 1 - Wrong yarn package installed

From your error message, it sounds to me like you've either not got yarn properly installed, of you've got the wrong package all together. How did you install it, if you ran sudo apt install yarn then this will fetch a package from cmdtest, which is a totally different project. You are looking for yarn the dependency manager

If this is the case, just uninstall it, and then install the correct package, e.g. for Debian:

  • sudo apt remove yarn
  • curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
  • echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  • sudo apt update && sudo apt install yarn

You can also just install yarn using NPM, which may be easier: First remove obsolete stuff: sudo apt remove cmdtest yarn, then install npm: sudo apt install npm, and finally yarn: sudo npm install -g yarn.
See the docs for more info


Option 2 - Alternative work arounds

  • Try using NPM instead: So clone, cd, then run npm install, npm run build and npm start
  • Try using Docker instead, and all of the system setup and dependencies will already be taken care of. So from within the directory, just run docker build -t lissy93/dashy . to build, and then use docker start to run the project, e.g: docker run -it -p 8080:80 lissy93/dashy (see the readme for more info)

Option 3 - Provide more info

If your still facing issues, then would you mind sharing details about your environment as well as the logs for this problem, so that I could look into this?

  • Which OS, distro, architecture and version are you using? e.g. cat /etc/os-release
  • Where applicable, which version of Yarn, NPM, NVM, Node do you have installed? e.g. yarn -v && npm -v && node -v
  • What is the full output of the offending command, and what do you see in your logs (usually in ~/.npm/_logs/*)

Prior to doing so, please check that everything is set up properly

  • Ensure that you have the latest version of yarn V 1.22.5, as well as Node.js V 14.17.0 or later
  • Ensure that your on the latest version of the master branch of Dashy, git checkout master && git pull origin master
  • Ensure you don't have any process.env variables manually set, which could cause warnings to halt the build
  • Ensure your user has all the required permissions on your system (once everything's installed, you shouldn't need sudo)
  • Ensure that your systems date and time are correct
  • Try clearing the cache, and reinstalling dependencies: yarn cache clean, rm -rf node_modules\ yarn.lock and yarn

@jacobhweeks
Copy link
Author

jacobhweeks commented May 15, 2021

Hi @Lissy93,

Thank you so much. I've got it running now using the first option that you provided. I would be interested in working on this or a fork of it. I'm relatively new to GitHub but have some development experience and would like to add features once I have had the time to look everything over to get the 'lay of the land'. Thanks again!

@Lissy93
Copy link
Owner

Lissy93 commented May 16, 2021

Great, glad it's all working now :)
Let me know if you need anything else


For anyone else experiencing yarn-related errors, I've updated the Troubleshooting Guide with instructions on how to fix.

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

2 participants