You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
For newer versions of git for windows, copy 5 files instead (rsync.exe, msys-1.0.dll, msys-iconv-2.dll, msys-intl-8.dll, and msys-popt-0.dll) from MinGW (C:\MinGW\msys\1.0\bin), after installing the rsync to the Program Files\Git\mingw64\bin directory (Program Files (x86) for 32-bit git in 64-bit windows).
Next bug that I hit is TypeError: base64 is not a function
I looked into it, and it appears that rsync cannot use /c/ in the base path because it won't be able to resolve it or something, so they suggested fix is to first change directory then use relative paths.
I modified build.sh to do such thing. I added RSYNC_SRC_DIR, RSYNC_OUT_DIR, and RSYNC_NPM_DIR replacing the non RSYNC versions in every rsync command. It appears rsync was added to angular in February. Before I call rsync I first change the directory to the PWD which is the project root path. rsync prompts the user with a dialog box for the firewall to open tcp and udp ports.
SRC_DIR=${ROOT_DIR}/${PACKAGE}
RSYNC_SRC_DIR=packages/${PACKAGE}
ROOT_OUT_DIR=${PWD}/dist/packages
OUT_DIR=${ROOT_OUT_DIR}/${PACKAGE}
RSYNC_OUT_DIR=dist/packages/${PACKAGE}
NPM_DIR=${PWD}/dist/packages-dist/${PACKAGE}
RSYNC_NPM_DIR=dist/packages-dist/${PACKAGE}
...
if [[ ${BUNDLE} == true ]]; then
...
echo "====== Copy ${PACKAGE} typings"
cd ${PWD}
rsync -a --exclude=*.js --exclude=*.js.map ${RSYNC_OUT_DIR}/ ${RSYNC_NPM_DIR}
moveTypings ${NPM_DIR} ${PACKAGE}
(
...
) 2>&1 | grep -v "as external dependency"
else
echo "====== Copy ${PACKAGE} node tool"
cd ${PDW}
rsync -a ${RSYNC_OUT_DIR}/ ${RSYNC_NPM_DIR}
fi
echo "====== Copy ${PACKAGE} package.json and .externs.js files"
cd ${PWD}
rsync -am --include="package.json" --include="*/" --exclude=* ${RSYNC_SRC_DIR}/${RSYNC_NPM_DIR}/
rsync -am --include="*.externs.js" --include="*/" --exclude=* ${RSYNC_SRC_DIR}/ ${RSYNC_NPM_DIR}/
I now am stuck at a bunch of warning messages. I'm not really sure where to go from here. It doesn't move forward, just hangs at this spot:
Reacted by Rokas Brazdžionis, Nail, Kumaran, snerks, Shai Reznik and Theodore Brown
Sorry! for mentioning so many people. I hope to bring more light to this.
I just want to contribute to this project and so I just started by forking the project and got stuck in the first phase i.e. to build this project. I'm not an expert and don't know how to move forward with the build and stuff and so I'm politely asking that PLEASE show some love to the Windows users. Can we bring some people to get a look into this issue? I know that everybody is busy and this is too much to ask but please help us to contribute.
We definitely want to do better for Windows users. If you've been following along, things have gotten better over the last few months (fewer / different types of errors), but there's still more to go before our Windows support for building Angular is on par with Linux/Mac. Currently we're working on migrating more of our build and test infrastructure into being managed by Bazel so that it relies less on OS-specific binaries and packages, but we're not there yet.
@gauravmahto There are several free virtualization possibilities. Getting a linux environment until a native Windows build is supported, is no big deal.
@manklu I know that getting a virtual Linux environment is no big deal and that's exactly what I've been trying to accomplish from past 2 days. But you see that this is not about just setting up a Linux environment as one should be aware of intricacies of such environment; one that they are not familiar of. For e.g.: A windows may not be aware of how to be productive in a Linux environment and more importantly, the how to properly set up such environment so that they can easily build, test and debug the software.
What I'm trying to say is it is very hard for a Windows user to help and contribute to such an awesome framework just because it is not so easy to start with.
I know docs/DEVELOPER.md is still mentioning build.sh and test.sh, but I am not sure they still work.
I am on Windows too and the way I build and test Angular is by using the Windows Subsystem for Linux and running the bazel commands described in docs/BAZEL.md (plus running scripts/build-packages-dist.sh if I need to build all packages as they are published to npm).
UPDATE: I added a TODO item here to update DEVELOPER.md, once the transition to bazel is completed.
I am going to close this, since build.sh (the script mentioned originally) has since been removed and we have moved on to bazel.
There are probably more issues there, but they are different than the ones reported here. If you are running into problems with the bazel-based setup, please open a new issue.
No, I don't think it is supposed to work on Windows. We are in the process of adding Windows to the platforms we test on CI (see the .codefresh/ directory for more details on what we have atm), but we have still work to do.
For now, I am either using WSL (which is easy to set up, but slow - but also about to get much faster) or a linux-based docker image to build and run bazel stuff.
Activity
wizarrc commentedon Jul 2, 2017
Same here. I even tried downgrading node and npm to versions specified in the DEVELOPER.md doc, which btw are below LTS.
wizarrc commentedon Jul 2, 2017
May be related to #16846 where it talks about build.sh requires full Linux environment.
wizarrc commentedon Jul 2, 2017
A workaround would be to:
angular\packages\upgrade\static>in command promptsrcto something likesrc.oldmklink /J "src" "..\src"Step 3 requires administrator elevation except for later version of Windows 10 I believe.
I haven't figured out how to add that to the
create-symlinks.shscripts file yet. Shouldn't be too hard though.That got me a bit further.
Update The next bug I ran into and it's workaround:
./build.sh: line 444: rsync: command not foundA workaround for running rsync on git for windows bash is blogged here:
https://alanbarber.com/2015/08/11/installing-rsync-on-windows/
For newer versions of git for windows, copy 5 files instead (rsync.exe, msys-1.0.dll, msys-iconv-2.dll, msys-intl-8.dll, and msys-popt-0.dll) from MinGW (

C:\MinGW\msys\1.0\bin), after installing the rsync to theProgram Files\Git\mingw64\bindirectory (Program Files (x86)for 32-bit git in 64-bit windows).Next bug that I hit is

TypeError: base64 is not a functionI looked up that error and found this on stack overflow:
https://stackoverflow.com/questions/43275778/angular-2-aot-typeerror-base64-is-not-a-function
Looks like node requires version 6+ but in the DEVELOPER.md requires < 6. I'm not sure if the document needs to be updated or not.
Update 2 After installing node 6.11.0, I ran
./build/shagain and got this error:The source and destination cannot both be remote.forrsync.https://stackoverflow.com/questions/29941966/rsync-cwrsync-in-gitbash-the-source-and-destination-cannot-both-be-remote
I looked into it, and it appears that rsync cannot use /c/ in the base path because it won't be able to resolve it or something, so they suggested fix is to first change directory then use relative paths.
I modified
build.shto do such thing. I addedRSYNC_SRC_DIR,RSYNC_OUT_DIR, andRSYNC_NPM_DIRreplacing the non RSYNC versions in everyrsynccommand. It appearsrsyncwas added to angular in February. Before I callrsyncI first change the directory to thePWDwhich is the project root path. rsync prompts the user with a dialog box for the firewall to open tcp and udp ports.I now am stuck at a bunch of warning messages. I'm not really sure where to go from here. It doesn't move forward, just hangs at this spot:
kumvem commentedon Sep 5, 2017
@wizarrc Did you solve the build issue? I followed similar steps to solve build issues. stuck with the following warning message.
/c/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js
WARN: Dropping unreachable code [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:224,8]
WARN: Declarations in unreachable code! [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:224,8]
WARN: Dropping unreachable code [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:265,8]
WARN: Declarations in unreachable code! [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:265,8]
WARN: Dropping unreachable code [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:1401,4]
WARN: Declarations in unreachable code! [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:1401,4]
WARN: Dropping unreachable code [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:9207,4]
WARN: Declarations in unreachable code! [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:9207,4]
WARN: Dropping unreachable code [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:13499,12]
WARN: Declarations in unreachable code! [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:13499,12]
WARN: Side effects in initialization of unused variable Renderer2Interceptor [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js:5369,4]
/c/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core.umd.js.map
/c/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core-testing.umd.js
WARN: Side effects in initialization of unused variable pendingTimers [C:/kumaran/open-source/angular/angular/dist/packages-dist/core/bundles/core-testing.umd.js:452,8]
wizarrc commentedon Sep 5, 2017
@kumvem never got it to work, I gave up for now, hoping others could startup where I failed.
snerks commentedon Sep 17, 2017
I followed the steps provided by @wizarrc, above (thanks!), with similar results.
As an additional step, I tried the suggestion, in #12454, to remove a call to
grepinbuild.sh:Search for the line:
) 2>&1 | grep -v "as external dependency"In my build.sh file, it was near line 440.
Truncate the line, to remove the
grepcall, such that it now reads:) 2>&1Launch the
MINGW64version ofbash.exeas Administrator:Navigate to the project root folder
./build.shTakes a while - but the build completes.
I do not know if there is a negative effect caused by removal of the
grepcall.4F2E4A2E commentedon Jun 28, 2018
@snerks I just did try it out on master and it did not work:
gauravmahto commentedon Dec 28, 2018
@kara @benlesh @IgorMinar @vsavkin @petebacondarwin @vicb @tbosch @pkozlowski-opensource
@matsko @alxhub
Sorry! for mentioning so many people. I hope to bring more light to this.
I just want to contribute to this project and so I just started by forking the project and got stuck in the first phase i.e. to build this project. I'm not an expert and don't know how to move forward with the build and stuff and so I'm politely asking that PLEASE show some love to the Windows users. Can we bring some people to get a look into this issue? I know that everybody is busy and this is too much to ask but please help us to contribute.
StephenFluin commentedon Dec 28, 2018
We definitely want to do better for Windows users. If you've been following along, things have gotten better over the last few months (fewer / different types of errors), but there's still more to go before our Windows support for building Angular is on par with Linux/Mac. Currently we're working on migrating more of our build and test infrastructure into being managed by Bazel so that it relies less on OS-specific binaries and packages, but we're not there yet.
manklu commentedon Dec 29, 2018
@gauravmahto There are several free virtualization possibilities. Getting a linux environment until a native Windows build is supported, is no big deal.
gauravmahto commentedon Dec 30, 2018
@manklu I know that getting a virtual Linux environment is no big deal and that's exactly what I've been trying to accomplish from past 2 days. But you see that this is not about just setting up a Linux environment as one should be aware of intricacies of such environment; one that they are not familiar of. For e.g.: A windows may not be aware of how to be productive in a Linux environment and more importantly, the how to properly set up such environment so that they can easily build, test and debug the software.
What I'm trying to say is it is very hard for a Windows user to help and contribute to such an awesome framework just because it is not so easy to start with.
gkalpak commentedon Dec 30, 2018
I know docs/DEVELOPER.md is still mentioning
build.shandtest.sh, but I am not sure they still work.I am on Windows too and the way I build and test Angular is by using the Windows Subsystem for Linux and running the bazel commands described in docs/BAZEL.md (plus running scripts/build-packages-dist.sh if I need to build all packages as they are published to npm).
UPDATE: I added a TODO item here to update
DEVELOPER.md, once the transition to bazel is completed.gauravmahto commentedon Dec 31, 2018
@gkalpak This is good information. A huge thanks to you for pointing me in the right direction. 🥇
Also, thank you for adding the TODO item.
Wishing everybody a joyous happy new year.
gkalpak commentedon Mar 27, 2019
I am going to close this, since
build.sh(the script mentioned originally) has since been removed and we have moved on to bazel.There are probably more issues there, but they are different than the ones reported here. If you are running into problems with the bazel-based setup, please open a new issue.
s-gbz commentedon May 10, 2019
@gkalpak is
scripts/build-packages-dist.shsupposed to work? It doesn't for me, becausecommand "." could not be foundgkalpak commentedon May 13, 2019
No, I don't think it is supposed to work on Windows. We are in the process of adding Windows to the platforms we test on CI (see the .codefresh/ directory for more details on what we have atm), but we have still work to do.
For now, I am either using WSL (which is easy to set up, but slow - but also about to get much faster) or a linux-based docker image to build and run bazel stuff.
gkalpak commentedon May 13, 2019
In case it helps, this
Dockerfileworks for me:angular-automatic-lock-bot commentedon Sep 15, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.