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

Bazel Angular example prod serve doesn't work on windows #1606

Closed
alan-agius4 opened this issue Feb 5, 2020 · 0 comments · Fixed by #1699
Closed

Bazel Angular example prod serve doesn't work on windows #1606

alan-agius4 opened this issue Feb 5, 2020 · 0 comments · Fixed by #1699
Assignees

Comments

@alan-agius4
Copy link
Contributor

alan-agius4 commented Feb 5, 2020

🐞 bug report

Affected Rule

The issue is caused by the rule:

Is this a regression?

Unsure

Description

ng serve --prod doesn't work in windows

The history-server will be spawned listening to C:\Users\alag\_bazel_alag\gi6irfiu\execroot\project\bazel-out\x64_windows-fastbuild\bin\src\prodserver.bat.runfiles\project\src\prodapp however runfiles are not symlinked in windows which causes the files not to be found.

🔬 Minimal Reproduction

Run ng serve --prod in https://github.com/bazelbuild/rules_nodejs/tree/master/examples/angular using Windows as OS.

🔥 Exception or Error

Error: ENOENT: no such file or directory, stat 'C:\Users\alag\_bazel_alag\gi6irfiu\execroot\project\bazel-out\x64_windows-fastbuild\bin\src\prodserver.bat.runfiles\src\prodapp\index.html'

🌍 Your Environment

Operating System: Windows

Output of bazel version:

l108498/:1 Refused to apply style from 'http://l108498:5432/bazel-out/x64_windows-fastbuild/bin/src/styles.css?v=1580898021431' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
l108498/:1 Refused to apply style from 'http://l108498:5432/external/npm/node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css?v=1580898021431' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
zone.min.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ts_scripts.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
l108498/:1 Refused to apply style from 'http://l108498:5432/bazel-out/x64_windows-fastbuild/bin/src/styles.css?v=1580898021431' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
l108498/:1 Refused to apply style from 'http://l108498:5432/external/npm/node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css?v=1580898021431' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
@alan-agius4 alan-agius4 changed the title Bazel Example prod build doesn't work on windows Bazel Example prod serve doesn't work on windows Feb 5, 2020
@alan-agius4 alan-agius4 changed the title Bazel Example prod serve doesn't work on windows Bazel Angular example prod serve doesn't work on windows Feb 5, 2020
@alan-agius4 alan-agius4 self-assigned this Feb 13, 2020
alan-agius4 added a commit to alan-agius4/rules_nodejs that referenced this issue Mar 9, 2020
In Windows runfiles are not always available thus we need to use the real location using `rlocation`.

Closes bazel-contrib#1606
alan-agius4 added a commit to alan-agius4/rules_nodejs that referenced this issue Mar 9, 2020
In Windows runfiles are not always available thus we need to use the real location using `rlocation`.

Closes bazel-contrib#1606
alan-agius4 added a commit to alan-agius4/rules_nodejs that referenced this issue Mar 9, 2020
In Windows runfiles are not always available thus we need to use the real location using `rlocation`.

Closes bazel-contrib#1606
gregmagolan pushed a commit that referenced this issue Mar 11, 2020
#1699)

In Windows runfiles are not always available thus we need to use the real location using `rlocation`.

Closes #1606
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

Successfully merging a pull request may close this issue.

1 participant