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

packages\upgrade\static\src symlink doesn't work on Windows #16760

Closed
bisubus opened this issue May 12, 2017 · 6 comments · Fixed by #16761
Closed

packages\upgrade\static\src symlink doesn't work on Windows #16760

bisubus opened this issue May 12, 2017 · 6 comments · Fixed by #16761
Labels
area: build & ci Related the build and CI infrastructure of the project

Comments

@bisubus
Copy link
Contributor

bisubus commented May 12, 2017

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

packages\upgrade\static\src is a symbolic link that isn't interpreted correctly on Windows. This results in error during compilation:

Compiling tools...
Creating .metadata.json files...
Error: Error at <...>/packages/upgrade/static/public_api.ts:15:44: Cannot find module './src/common/angular1'.
Error at <...>/packages/upgrade/static/public_api.ts:16:34: Cannot find module './src/common/downgrade_component'.
Error at <...>/packages/upgrade/static/public_api.ts:17:35: Cannot find module './src/common/downgrade_injectable'.
Error at <...>/packages/upgrade/static/public_api.ts:18:23: Cannot find module './src/common/version'.
Error at <...>/packages/upgrade/static/public_api.ts:19:32: Cannot find module './src/static/upgrade_component'.
Error at <...>/packages/upgrade/static/public_api.ts:20:29: Cannot find module './src/static/upgrade_module'.
    at UserError.Error (native)
    at new UserError (<...>\dist\tools\@angular\tsc-wrapped\src\tsc.js:21:28)
    at check (<...>\dist\tools\@angular\tsc-wrapped\src\tsc.js:87:15)
    at Tsc.typeCheck (<...>\dist\tools\@angular\tsc-wrapped\src\tsc.js:172:9)
    at <...>\dist\tools\@angular\tsc-wrapped\src\main.js:106:23
    at process._tickCallback (internal/process/next_tick.js:109:7)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:505:3
Compilation failed

Expected behavior

Symbolic link is supposed to work for all operation systems.

Minimal reproduction of the problem with instructions

In cloned repo:

npm i
bash ./scripts/windows/create-symlinks.sh
bash ./test.sh node

Please tell us about your environment:

Windows 7
Node 6.10.3
NPM 3.10.10
git 2.9.0.windows.1

  • Angular version: 4.2.0-beta.1
bisubus added a commit to bisubus/angular that referenced this issue May 12, 2017
Fixes packages\upgrade\static\src symlink.

Closes angular#16760
@gkalpak
Copy link
Member

gkalpak commented May 12, 2017

This happens because scripts/windows/create-symlinks.sh doesn't fix this symlink.
(That said, even after manually fixing the symlink, I haven't been able to run ./build.sh successfully on Windows. Yet 😛)

@bisubus
Copy link
Contributor Author

bisubus commented May 12, 2017

@gkalpak I've just investigated it. Yes, it is so indeed. Just submitted a PR to fix this. I've had some problems on Windows, but currently I'm able to run ./build.sh.

bisubus added a commit to bisubus/angular that referenced this issue May 12, 2017
Fixes packages\upgrade\static\src symlink.

Closes angular#16760
@gkalpak
Copy link
Member

gkalpak commented May 12, 2017

@bisubus, anything special you had to do to get ./build.sh to successfully run on Windows? What version of Windows?

@bisubus
Copy link
Contributor Author

bisubus commented May 12, 2017

@gkalpak Windows 7 x64, as administrator. I've accidentally got some weird issues with NPM 3 installation, but after fixing the symlink and installing Bower packages it went ok.

Yes, there are some kinks. I've used MinGW, and I'm running here

npm i
bower i
C:\MinGW\msys\1.0\bin\bash.exe ./scripts/windows/create-symlinks.sh 
C:\MinGW\msys\1.0\bin\bash.exe ./build.sh

It looks like it does the job, at least there were no errors.

Git for Windows has got bundled MinGW/msys and bash but has no rsync, which is required. And no luck with Cygwin, too, Windows paths were showstoppers there.

Actually, this sounds a bit more sophisticated than the paper suggests, to say the least of it. I guess this deserves a separate issue, since it's not nearly as simple for Windows devs as expected. They aren't able to run ./build.sh from command line for starters.

@jasonaden jasonaden added the area: build & ci Related the build and CI infrastructure of the project label May 15, 2017
mhevery pushed a commit to bisubus/angular that referenced this issue Jul 26, 2017
Fixes packages\upgrade\static\src symlink.

Closes angular#16760
@tpeter1985
Copy link

Can someone tell when the pull request can be approved?
Tried to get angular running for 3 hours now (on windows) but it shows up this error.

vicb pushed a commit that referenced this issue Nov 2, 2017
Fixes packages\upgrade\static\src symlink.

Closes #16760
vicb pushed a commit that referenced this issue Nov 2, 2017
Fixes packages\upgrade\static\src symlink.

Closes #16760
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: build & ci Related the build and CI infrastructure of the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants