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

Install Errors on DASH branch #1360

Closed
brianegan opened this issue Oct 2, 2018 · 10 comments
Closed

Install Errors on DASH branch #1360

brianegan opened this issue Oct 2, 2018 · 10 comments
Labels
infra.structure Relates to the tools that create docs.flutter.dev

Comments

@brianegan
Copy link
Contributor

brianegan commented Oct 2, 2018

Hey hey :)

I'm trying to do some work on the DASH branch, but I just can't get the installation working.

Repro Steps:

  1. Install all the dependencies (nvm, rvm, flutter, etc)
  2. Clone the repo with Submodules
  3. Run installation scripts -- This is where I run into trouble!

I always get the error:

ERROR: nvm not installed. See README setup instructions. Skipping setup.

or

ERROR: rvm not installed. See README setup instructions. Skipping setup.

Both of these commands exist on my computer and function properly, but for some reason the script can't find them. I tried copying the __type_t function into it's own shell file, and that works fine.

__type_t() { if [[ -n "$ZSH_VERSION" ]]; then whence -w $*; else type -t $*; fi }
export -f __type_t > /dev/null

if ! __type_t rvm > /dev/null; then
  echo "ERROR: rvm not installed. See README setup instructions. Skipping setup."
fi

Additional feedback:

Would it be possible to make this project work without modifying so much of my computer's environment?

@chalin
Copy link
Contributor

chalin commented Oct 2, 2018

Hi Brian. Sorry that you are having trouble.

Which OS and command shell do you use?

  1. Run installation scripts -- This is where I run into trouble!

I'll assume that you followed all the steps in the README, but it feels like you might have missed step 3.2: source ./tool/env-set.sh. This needs to be run in each new terminal/shell that you create.

I always get the error: ... ERROR: rvm not installed.

Which command/script are you running when you get this error (i.e., which step in part 3 of the README)?

Both of these commands exist on my computer and function properly, but for some reason the script can't find them.

Generally, nvm is less of an issue, but rvm is special in the way that it sets itself up (so special care needs to be taken in terms of which (source'd) scripts set it up).

Would it be possible to make this project work without modifying so much of my computer's environment?

This is a common setup we have across the three main Dart sites, and it is meant to work well for all of our core contributors, and it should be easy for new contributors too. But, there might still be some kinks to iron out :). That being said, a simpler setup satisfying all of our contributor needs would certainly be welcome if you'd like to give that a try.

@chalin chalin added the infra.structure Relates to the tools that create docs.flutter.dev label Oct 2, 2018
@brianegan
Copy link
Contributor Author

brianegan commented Oct 2, 2018

Hey there -- oh my gosh, I'm such an idiot -- I typed in sh ./tool/env-set.sh instead of source ./tool/env-set.sh. My bad.

Using source worked fine.

Overall, I think I the setup generally works pretty well, but for some reason I always run into issues when rvm gets involved, haha.

@brianegan brianegan reopened this Oct 2, 2018
@brianegan
Copy link
Contributor Author

brianegan commented Oct 2, 2018

All right, the source worked, and I'm onto the next step!

I'm using ZSH on a Mac running Mojave.

I'm running the following and getting an error:

GIR lab/flutter_website ‹dash› » source ./tool/env-set.sh                                                                                          
Setting environment variables from tool/env-set.sh
v10.11.0 is already installed.
Now using node v10.11.0 (npm v6.4.1)
RVM current: ruby-2.4.3
  Using ruby-2.4.3 (rvm 1.29.4)
Ruby --version: ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-darwin18]
INFO: git config push.recurseSubmodules is set to check.
INFO: git config status.submodulesummary is set to 1.
GIR lab/flutter_website ‹dash› » ./tool/before-install.sh
tool/shared/before-install.sh: line 27: travis_fold: command not found
GIR lab/flutter_website ‹dash› »         

@chalin
Copy link
Contributor

chalin commented Oct 2, 2018

All right, the source worked, and I'm onto the next step!

Good.

I'm using ZSH ...

Ok, I've only recently starting trying to tweak the scripts to zsh. I think that the current workaround that we have is to define travis_fold yourself:

$ travis_fold() { true; }
$ export -f travis_fold
$ # now run the rest of the install scripts

(I'm not sure why the export from within env-set.sh isn't working under zsh.)

Another option is to run an interactive bash session for flutter/website build commands only.

@brianegan
Copy link
Contributor Author

Thanks! Seems to still cause a bug, hrm...

GIR lab/flutter_website ‹dash*› » travis_fold() { true; }                 127 ↵
GIR lab/flutter_website ‹dash*› » export -f travis_fold   
travis_fold () {
	true
}
GIR lab/flutter_website ‹dash*› » ./tool/before-install.sh
tool/shared/before-install.sh: line 27: travis_fold: command not found

@brianegan
Copy link
Contributor Author

Ok, hopped over to BASH to get it running! The before-install and install scripts mostly worked (I had to work around this issue with Nokogiri: sparklemotion/nokogiri#1801).

I was then able to serve the site! One note: I did get this warning when serving, but the site seems to work:

$ ./tool/serve.sh 
Cached PIDs for build and serve: 6462, 6463
+ bundle exec jekyll build --incremental --watch
+ npx superstatic --version
5.0.2
+ npx superstatic --port 4002

Superstatic started.
Visit http://localhost:4002 to view your app.
Configuration file: /Users/phillywiggins/lab/flutter_website/_config.yml
            Source: src
       Destination: /Users/phillywiggins/lab/flutter_website/_site
 Incremental build: enabled
      Generating... 
                    done in 0.276 seconds.
        ** ERROR: directory is already being watched! **

        Directory: /Users/phillywiggins/lab/flutter_website/src/_shared/_includes

        is already being watched through: /Users/phillywiggins/lab/flutter_website/site-shared/src/_includes

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
        ** ERROR: directory is already being watched! **

        Directory: /Users/phillywiggins/lab/flutter_website/src/_shared/_assets/images

        is already being watched through: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/image

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
        ** ERROR: directory is already being watched! **

        Directory: /Users/phillywiggins/lab/flutter_website/src/_shared/_assets/image

        is already being watched through: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/image

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
        ** ERROR: directory is already being watched! **

        Directory: /Users/phillywiggins/lab/flutter_website/src/_assets/image/shared/dart/icon

        is already being watched through: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/image/dart/logo

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
        ** ERROR: directory is already being watched! **

        Directory: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/image

        is already being watched through: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/image

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
        ** ERROR: directory is already being watched! **

        Directory: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/images/dart/icon

        is already being watched through: /Users/phillywiggins/lab/flutter_website/site-shared/src/_assets/image/dart/logo

        MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors
 Auto-regeneration: enabled for 'src'

@chalin
Copy link
Contributor

chalin commented Oct 2, 2018

Ok, hopped over to BASH to get it running!

Thanks.

** ERROR: directory is already being watched! **

Yes, you can ignore those messages. The site will build and serve anyways. I've just added a note to the README to this effect (for details, see #1363).

So, can we close this issue?

@brianegan
Copy link
Contributor Author

brianegan commented Oct 2, 2018

Yep, sounds good -- was hoping I could use my normal workflow with ZSH, but I can use BASH for the time being on this project.

Should we create a separate issue for that, or not worth it?

@chalin
Copy link
Contributor

chalin commented Oct 2, 2018

was hoping I could use my normal workflow with ZSH, ...
Should we create a separate issue for that, or not worth it?

It is unlikely that I'll have the time to smoothen out zsh setup issues, but if you find a solution and/or would like to submit a PR, I'd be glad to integrate it. Thanks!

@Sfshaza
Copy link
Contributor

Sfshaza commented Oct 2, 2018

Thanks for being all over this, @chalin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra.structure Relates to the tools that create docs.flutter.dev
Projects
None yet
Development

No branches or pull requests

3 participants