website
website copied to clipboard
Fix website local builds on Windows
Describe the problem
When I set up docker image on Windows Power Shell
make up
fails by jekyll
logs
> make up
docker-compose up site
Recreating website_site_1 ... done
Attaching to website_site_1
site_1 | bundle exec jekyll serve \
site_1 | --host 0.0.0.0 \
site_1 | --port 4002 \
site_1 | --config _config.yml,_config_dev.yml \
site_1 | --livereload \
site_1 | --incremental \
site_1 | --trace
site_1 | Configuration file: /app/_config.yml
site_1 | Configuration file: /app/_config_dev.yml
site_1 | bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
site_1 | /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in `require': /app/src/_plugins/breadcrumb.rb:1: unknown regexp option - t (SyntaxError)
site_1 | ../../site-shared/src/_plugins/breadcru...
site_1 | ^~~~~
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in `block in require_with_graceful_fail'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `each'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:89:in `block in require_plugin_files'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `each'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `require_plugin_files'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:21:in `conscientious_require'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in `setup'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in `initialize'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `new'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `process'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
site_1 | from /usr/local/bundle/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
site_1 | from /usr/local/bundle/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
site_1 | from /usr/local/bundle/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
site_1 | from /usr/local/bundle/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
site_1 | from /usr/local/bundle/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
site_1 | from /usr/local/bundle/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
site_1 | from /usr/local/bundle/bin/jekyll:23:in `load'
site_1 | from /usr/local/bundle/bin/jekyll:23:in `<top (required)>'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/cli/exec.rb:58:in `load'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/cli/exec.rb:58:in `kernel_load'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/cli/exec.rb:23:in `run'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/cli.rb:478:in `exec'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/cli.rb:31:in `dispatch'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/cli.rb:25:in `start'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/exe/bundle:49:in `block in <top (required)>'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
site_1 | from /usr/local/bundle/gems/bundler-2.2.30/exe/bundle:37:in `<top (required)>'
site_1 | from /usr/local/bundle/bin/bundle:23:in `load'
site_1 | from /usr/local/bundle/bin/bundle:23:in `<main>'
site_1 | make: *** [Makefile:61: serve] Error 1
website_site_1 exited with code 2
Expected fix
Being to able to setup and serve website locally
Additional context
What I tried
> git config --global core.autocrlf input
> git clone --recurse-submodules https://github.com/flutter/website.git
> cd .\website\
> scoop install make
> make setup
> make up
Environment
I am using Windows Power Shell.
> make --version
GNU Make 4.3
Built for Windows32
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
> scoop --version
Current Scoop version:
bae0be95 (HEAD -> master, origin/master, origin/HEAD) fix(core): use `script:url` instead of `url` (#4492)
'main' bucket:
41c739643 (HEAD -> master, origin/master, origin/HEAD) fossa: Update to version 2.19.6
> docker --version
Docker version 20.10.8, build 3967b7d
> git --version
git version 2.23.0.windows.1
Hi @skytomo221, Thanks for filing the issue. I am not sure How this issue is related to flutter. Could you please explain?
Thanks
Sorry for lack of the explain.
I cloned this repository for translation.
I tried to set up and serve the website locally before editing following README.md. And an error occurred in Step 4 (make up
) of Setting up your local environment and serving changes.
I searched for a similar issue about Jekyll but couldn't find it. I thought it seems that some errors were made in Docker setting of this repository. But I don't know the specific cause. Did I overlook setting up something before I build the site? I tried it on 2 Windows 10 PCs and the results were the same.
Thank you for your prompt reply.
Hi @skytomo221 sorry for the delayed response, Does make setup run successfully? And on which branch were you trying to build the site?
In my case make setup
failed
logs
$ make setup
touch .env
make clean
make[1]: Entering directory 'C:/Users/mahesh/Desktop/website'
rm -rf _site .jekyll* src/.jekyll* *.log tmp example.g .dart_tool
make[1]: Leaving directory 'C:/Users/mahesh/Desktop/website'
docker-compose build site
Building site
[+] Building 305.6s (19/21)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 3.26kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 146B 0.0s
=> [internal] load metadata for docker.io/library/ruby:3-buster 6.2s
=> [auth] library/ruby:pull token for registry-1.docker.io 0.0s
=> [dev 1/16] FROM docker.io/library/ruby:3-buster@sha256:5697429d2970d13c6c913be43029c5ba228aeea891704c8 60.5s
=> => resolve docker.io/library/ruby:3-buster@sha256:5697429d2970d13c6c913be43029c5ba228aeea891704c81093f19 0.0s
=> => sha256:5697429d2970d13c6c913be43029c5ba228aeea891704c81093f19decccb93f9 1.86kB / 1.86kB 0.0s
=> => sha256:07471e81507f7cf1100827f10c60c3c0422d1222430e34e527d97ec72b14a193 50.44MB / 50.44MB 16.8s
=> => sha256:fd488089af5e3cc749c433944cb70cbec4d6ccc1a373cc9a84b320898d9655a8 2.00kB / 2.00kB 0.0s
=> => sha256:444674e3a6ae789847a69e33210c52ab2e455f530b7006f85e3b0726cbac2f47 7.29kB / 7.29kB 0.0s
=> => sha256:c6cef1aa2170c001b320769bf8b018ed82d2c94a673e3010ea1ffe152e107419 7.83MB / 7.83MB 4.4s
=> => sha256:13a51f13be8e69cfc526b671d0bbf621b985b0932acd1523050e2995777b5926 10.00MB / 10.00MB 4.7s
=> => sha256:def39d67a1a77adaac93be02cc61a57145a5a6273cd061d97660f30ef1e09bc1 51.84MB / 51.84MB 20.1s
=> => sha256:a8367252e08e761371f9573b3782f46abf9fc70ae38395ae9f3d3c232ced60d3 192.43MB / 192.43MB 38.8s
=> => sha256:bd523ed37df1310aae248fa7c664469177ebc6ad24b427ac893cf02d9c4fa7b3 200B / 200B 18.7s
=> => extracting sha256:07471e81507f7cf1100827f10c60c3c0422d1222430e34e527d97ec72b14a193 7.0s
=> => sha256:79c4b569d8195db72c187e2f7e5f379bf0e6e0658c86d34d2ee2fceab7815de1 28.45MB / 28.45MB 24.9s
=> => sha256:81212c1ed3ce4183017749daf79fddf441d301b44fdd08a2df99b6d1019efe4c 176B / 176B 20.6s
=> => extracting sha256:c6cef1aa2170c001b320769bf8b018ed82d2c94a673e3010ea1ffe152e107419 0.9s
=> => extracting sha256:13a51f13be8e69cfc526b671d0bbf621b985b0932acd1523050e2995777b5926 0.8s
=> => extracting sha256:def39d67a1a77adaac93be02cc61a57145a5a6273cd061d97660f30ef1e09bc1 7.5s
=> => extracting sha256:a8367252e08e761371f9573b3782f46abf9fc70ae38395ae9f3d3c232ced60d3 19.5s
=> => extracting sha256:bd523ed37df1310aae248fa7c664469177ebc6ad24b427ac893cf02d9c4fa7b3 0.0s
=> => extracting sha256:79c4b569d8195db72c187e2f7e5f379bf0e6e0658c86d34d2ee2fceab7815de1 0.9s
=> => extracting sha256:81212c1ed3ce4183017749daf79fddf441d301b44fdd08a2df99b6d1019efe4c 0.0s
=> [internal] load build context 57.8s
=> => transferring context: 1.11GB 57.6s
=> [dev 2/16] RUN curl -sL https://deb.nodesource.com/setup_15.x -o node_setup.sh && bash node_setu 42.4s
=> [dev 3/16] RUN apt-get update && apt-get install -yq --no-install-recommends build-essential 11.7s
=> [dev 4/16] WORKDIR /app 0.0s
=> [dev 5/16] RUN gem install bundler 2.6s
=> [dev 6/16] COPY Gemfile Gemfile.lock ./ 0.0s
=> [dev 7/16] RUN bundle install 74.1s
=> [dev 8/16] COPY package.json package-lock.json ./ 0.1s
=> [dev 9/16] RUN npm install -g npm firebase-tools superstatic 49.7s
=> [dev 10/16] RUN npm install 4.9s
=> [dev 11/16] COPY ./ ./ 45.9s
=> [dev 12/16] RUN git submodule update --init --recursive 3.7s
=> [dev 13/16] RUN if test -n "" -a "" != "stable" ; then cd flutter && git fetch && git 1.9s
=> ERROR [dev 14/16] RUN flutter doctor --suppress-analytics --quiet 1.7s
------
> [dev 14/16] RUN flutter doctor --suppress-analytics --quiet:
#18 1.502 /usr/bin/env: ‘bash\r’: No such file or directory
------
executor failed running [/bin/sh -c flutter doctor --suppress-analytics --quiet]: exit code: 127
ERROR: Service 'site' failed to build : Build failed
make: *** [Makefile:54: setup] Error 1
I was trying on main branch.
> [dev 14/16] RUN flutter doctor --suppress-analytics --quiet:
#18 1.502 /usr/bin/env: ‘bash\r’: No such file or directory
I think this is the same as isuue #6201. The issue can be avoided by executing git config --global core.autocrlf input
before step 2 (git clone --recurse-submodules https://github.com/<username-or-flutter>/website.git
).
thanks for the info @skytomo221 its still failing for me, Keeping this issue open for further investigation from the team.
logs
$ make setup
touch .env
make clean
make[1]: Entering directory 'C:/Users/mahesh/Desktop/website'
rm -rf _site .jekyll* src/.jekyll* *.log tmp example.g .dart_tool
make[1]: Leaving directory 'C:/Users/mahesh/Desktop/website'
docker-compose build site
time="2021-11-17T05:48:14+05:30" level=warning msg="The \"DISABLE_TESTS\" variable is not set. Defaulting to a blank string."
time="2021-11-17T05:48:14+05:30" level=warning msg="The \"FIREBASE_ALIAS\" variable is not set. Defaulting to a blank string."
time="2021-11-17T05:48:14+05:30" level=warning msg="The \"FIREBASE_TOKEN\" variable is not set. Defaulting to a blank string."
#1 [internal] load build definition from Dockerfile
#1 sha256:469aa933ae5dfa6d4269bbe15e455adda9f7095cf4edb1f347561efb850aff42
#1 transferring dockerfile: 2.83kB done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:f3fc3fe7d6acb291372269ff327142cf6fa5e71103b4db31f5d25534b5757187
#2 transferring context:
#2 transferring context: 139B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/ruby:3-buster
#3 sha256:df66394f91f845e96404cd0f06a808649ad0177e61733aadd5eff962a00ff40c
#3 ...
#4 [auth] library/ruby:pull token for registry-1.docker.io
#4 sha256:f6e0e139c53772d4c7e8f34a168486314a4a92b2d9cba331e54e653e73d9b81c
#4 DONE 0.0s
#3 [internal] load metadata for docker.io/library/ruby:3-buster
#3 sha256:df66394f91f845e96404cd0f06a808649ad0177e61733aadd5eff962a00ff40c
#3 DONE 7.9s
#5 [dev 1/17] FROM docker.io/library/ruby:3-buster@sha256:5697429d2970d13c6c913be43029c5ba228aeea891704c81093f19decccb93f9
#5 sha256:27421f8a7e70b7ccccdef386155aebee67f519fe679cbd06d5f5d777e650b34b
#5 CACHED
#10 [internal] load build context
#10 sha256:6a2908e783654131c16dc1a4403ed5bcb942f7e5776c1c04b64ac97a13c8340a
#10 transferring context: 2.74MB 0.1s
#10 transferring context: 291.58MB 5.2s
#10 ...
#6 [dev 2/17] RUN curl -sL https://deb.nodesource.com/setup_17.x -o node_setup.sh && bash node_setup.sh 1> /dev/null
#6 sha256:6abdde215bd8e92a4a3b93f15526442024f9e2f8dcfac9666f5800b6de711c2e
#6 8.352 E: Release file for http://deb.debian.org/debian/dists/buster-updates/InRelease is not valid yet (invalid for another 2h 0min 26s). Updates for this repository will not be applied.
#6 ERROR: executor failed running [/bin/sh -c curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x -o node_setup.sh && bash node_setup.sh 1> /dev/null]: exit code: 1
#10 [internal] load build context
#10 sha256:6a2908e783654131c16dc1a4403ed5bcb942f7e5776c1c04b64ac97a13c8340a
#10 transferring context: 466.32MB 9.2s done
#10 CANCELED
------
> [dev 2/17] RUN curl -sL https://deb.nodesource.com/setup_17.x -o node_setup.sh && bash node_setup.sh 1> /dev/null:
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x -o node_setup.sh && bash node_setup.sh 1> /dev/null]: exit code: 1
make: *** [Makefile:56: setup] Error 17
cc: @Sfshaza
Hi @skytomo221 sorry for the delayed response, Does make setup run successfully? And on which branch were you trying to build the site? In my case
make setup
failed
I just experienced this same issue on Windows:
logs
$ make setup ... => [dev 12/16] RUN git submodule update --init --recursive 3.7s => [dev 13/16] RUN if test -n "" -a "" != "stable" ; then cd flutter && git fetch && git 1.9s => ERROR [dev 14/16] RUN flutter doctor --suppress-analytics --quiet 1.7s ------ > [dev 14/16] RUN flutter doctor --suppress-analytics --quiet: #18 1.502 /usr/bin/env: ‘bash\r’: No such file or directory ------ executor failed running [/bin/sh -c flutter doctor --suppress-analytics --quiet]: exit code: 127 ERROR: Service 'site' failed to build : Build failed make: *** [Makefile:54: setup] Error 1
Which I solved by setting Git's core.autocrlf
to input
before initializing the repostory's submodules.
The subsequent failure has a different error message:
thanks for the info @skytomo221 its still failing for me, Keeping this issue open for further investigation from the team.
logs
$ make setup ... #6 [dev 2/17] RUN curl -sL https://deb.nodesource.com/setup_17.x -o node_setup.sh && bash node_setup.sh 1> /dev/null #6 sha256:6abdde215bd8e92a4a3b93f15526442024f9e2f8dcfac9666f5800b6de711c2e #6 8.352 E: Release file for http://deb.debian.org/debian/dists/buster-updates/InRelease is not valid yet (invalid for another 2h 0min 26s). Updates for this repository will not be applied. #6 ERROR: executor failed running [/bin/sh -c curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x -o node_setup.sh && bash node_setup.sh 1> /dev/null]: exit code: 1 #10 [internal] load build context #10 sha256:6a2908e783654131c16dc1a4403ed5bcb942f7e5776c1c04b64ac97a13c8340a #10 transferring context: 466.32MB 9.2s done #10 CANCELED ------ > [dev 2/17] RUN curl -sL https://deb.nodesource.com/setup_17.x -o node_setup.sh && bash node_setup.sh 1> /dev/null: ------ failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x -o node_setup.sh && bash node_setup.sh 1> /dev/null]: exit code: 1 make: *** [Makefile:56: setup] Error 17
cc: @Sfshaza
Going by the line that reads:
E: Release file for http://deb.debian.org/debian/dists/buster-updates/InRelease is not valid yet (invalid for another 2h 0min 26s). Updates for this repository will not be applied.
I suspect that was a temporary issue. so I created #7217 just now, which I believe relates to this issue.. ~~perhaps even closes it?~~ nope, it doesn't.. still getting the OP failed to load command: jekyll
error.
Such a bs! You get lots of errors, and after wasting a lot of hours, you can't even run a freaking build. Great job👏👏
@babakfp I have hidden your offensive comment. Please consider reading the code of conduct before engaging here.
@babakfp I have hidden your offensive comment. Please consider reading the code of conduct before engaging here.
No thanks. I have 0 intentions to do anything with Flutter anymore when I see you guys can't build something that works. It's just a website, it's not a rocket engine.
note: I'm not a member of the Flutter dev group, nor am I attempting to speak on their behalf.. these are just my personal opinions.
No thanks. I have 0 intentions to do anything with Flutter anymore when I see you guys can't build something that works. It's just a website, it's not a rocket engine.
there's nothing wrong with the concept of using "the right tool for the job". if Flutter does way more than you need, then by all means use something simpler and more appropriate for your project's needs..
at the end of the day, that's your choice.. good luck with your project, hope you find what you're looking for. 👍🏼
there's nothing wrong with the concept of using "the right tool for the job". if Flutter does way more than you need, then by all means use something simpler and more appropriate for your project's needs..
A few days ago I just looked at Flutter repos to see what's going on. I saw in the website repo there are a few basic issues that I could fix. I thought it was a great way to get involved by fixing these issues... It didn't go well because as you see it's a mess. How it's possible that you create a website that doesn't just run. You install it and you run it. So, it doesn't look great for the Flutter team and Flutter itself.
at the end of the day, that's your choice.. good luck with your project, hope you find what you're looking for. 👍🏼
Thanks dude👍
@khanhnwin, can you weigh in here? I have no experience with Windows Power Shell.
@babakfp, were you able to resolve this problem?
@babakfp, were you able to resolve this problem?
When I saw the amount of mess on this website, I immediately remove the fork and tried to fool myself into that this was all a bad nightmare. So, no🙂
Unfortunately I don't have experience with PowerShell either. Are y'all able to run a make build
?
I have the same issue on Windows 10
make setup
- seems to work fine
make setup result
found 0 vulnerabilities
docker-compose run --rm site bundle config set force_ruby_platform true
docker-compose run --rm site bundle install
Using rake 13.0.6
Using concurrent-ruby 1.2.2
Using i18n 1.12.0
Using minitest 5.18.0
Using tzinfo 2.0.6
Using activesupport 7.0.4.3
Using public_suffix 5.0.1
Using addressable 2.8.1
Using bundler 2.4.8
Using colorator 1.1.0
Using eventmachine 1.2.7
Using http_parser.rb 0.8.0
Using em-websocket 0.5.3
Using forwardable-extended 2.6.0
Using extras 0.3.0
Using ffi 1.15.5
Using google-protobuf 3.22.2
Using sass-embedded 1.59.2
Using jekyll-sass-converter 3.0.0
Using rb-fsevent 0.11.2
Using rb-inotify 0.10.1
Using listen 3.8.0
Using jekyll-watch 2.2.1
Using rexml 3.2.5
Using kramdown 2.4.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.4
Using mercenary 0.4.0
Using pathutil 0.16.2
Using rouge 4.1.0
Using safe_yaml 1.0.5
Using unicode-display_width 2.4.2
Using terminal-table 3.0.2
Using webrick 1.8.1
Using jekyll 4.3.2
Using jekyll-include-cache 0.2.1
Using mini_portile2 2.8.1
Using racc 1.6.2
Using nokogiri 1.14.2
Using jekyll-toc 0.18.0
Using liquid-tag-parser 2.0.2
Bundle complete! 7 Gemfile dependencies, 41 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.
But from the other hand make up
does not work for me and thorws the same error that issue refers.
I have tried installing jekyll
manually, but it didn't work.
Why do people use flutter when such problems exist? This issue has been open for 2 years!
@babakfp : To be clear, this is not a Flutter issue, but a Windows Git issue.
Check out this StackOverflow post that explains the issue.
TL;DR: Git translated UNIX line breaks to Windows line breaks on git clone
. bash
has no idea what to do with those line breaks.
@skytomo221 : You were close.
$ git config --global core.autocrlf input
That ensured that all writes to git and GitHub use LF only.
$ git config --global core.autocrlf false
This ensures that all reads to git and GitHub use LF only.
A deeper dive can be found on this GitHub page.
This issue will be closed in one week.
@babakfp : To be clear, this is not a Flutter issue, but a Windows Git issue.
I disagree, running the website on Windows is seriously non-trivial. It would be useful if the website's infrastructure was easier to use for Windows users, or alternatively, fixing the GitHub Codespace (see https://github.com/flutter/website/issues/9047). This would help welcome more contributions from our community which uses Windows predominantly.
Personally, I edit the website using the WSL2 (Windows Subsystem for Linux) and VS Code remote development:
- On Windows, launch Docker Desktop
- Within WSL2, follow the instructions to run the website
- Within WSL2, use
code .
to launch VS Code remote development - In your Windows browser, navigate to
http://127.0.0.1:4002/
to browse the website
Adding from #8272:
Describe the problem
https://github.com/flutter/website/blob/5494bf1ac41f10fe0fb236c66677c1b5a5c8c3dc/Makefile#L172-L173
Since most of the commands start with clean
, there is no way to run rm
on Windows command lines.
C:\ProgramData\chocolatey\bin\make.exe -f X:\Coding\Garages\GitHub\flutter-website\Makefile -C X:\Coding\Garages\GitHub\flutter-website build
process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed.
X:\Coding\Garages\GitHub\flutter-website\Makefile:12: pipe: No error
make: Entering directory 'X:/Coding/Garages/GitHub/flutter-website'
make clean
make[1]: Entering directory 'X:/Coding/Garages/GitHub/flutter-website'
rm -rf _site .jekyll* src/.jekyll* *.log tmp .dart_tool
make[1]: Leaving directory 'X:/Coding/Garages/GitHub/flutter-website'
process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed.
Makefile:12: pipe: No error
process_begin: CreateProcess(NULL, rm -rf _site .jekyll* src/.jekyll* *.log tmp
.dart_tool, ...) failed.
make (e=2): 系统找不到指定的文件。
make[1]: *** [Makefile:153: clean] Error 2
make: *** [X:\Coding\Garages\GitHub\flutter-website\Makefile:135: build] Error 2
make: Leaving directory 'X:/Coding/Garages/GitHub/flutter-website'
Process finished with exit code 2
Also, copying Flutter from the host will cause platform issues that unable to start any Flutter commands.
env: bash\r: No such file or directory
https://github.com/flutter/website/blob/5494bf1ac41f10fe0fb236c66677c1b5a5c8c3dc/Dockerfile#L27-L28
@babakfp : To be clear, this is not a Flutter issue, but a Windows Git issue.
I disagree, running the website on Windows is seriously non-trivial. It would be useful if the website's infrastructure was easier to use for Windows users, or alternatively, fixing the GitHub Codespace (see #9047). This would help welcome more contributions from our community which uses Windows predominantly.
@loic-sharma Thanks for being friendly to Windows users! flutter-intellij
also had the same situation previously and I'm able to update it on Windows which makes me fix a couple of issues.