Tagged: Console+ Bug
- This topic has 2 replies, 2 voices, and was last updated 7 years, 5 months ago by Claudio Trajtenberg.
-
AuthorPosts
-
Claudio TrajtenbergParticipantRunning ng build –base-href=/some context root yields a local path in the index.html file.
Configuration:
node: 7.10.0 os: win32 x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @angular/core: 4.1.3 @angular/forms: 4.1.3 @angular/http: 4.1.3 @angular/platform-browser: 4.1.3 @angular/platform-browser-dynamic: 4.1.3 @angular/router: 4.1.3 @angular/cli: 1.0.6 @angular/compiler-cli: 4.1.3
reproduction steps:
- Create a simple project
- run ng build –base-href=/some-context-path/
Yields
<base href="C:/Program Files/Git/test/">
in the<head>
I tested with cygwin bash and Windows cmd and the command works properly
The issue has been discussed at angular cli github
Workaround run the command in a regular console using Local Terminal (Windows cmd) you will have to cd to your project location
support-piotrParticipantClaudio,
Thanks for letting us know about this problem. Terminal+ has to work with git bash for various reasons and there is nothing we can do about this issue. Fortunately, there is a simple workaround with specifying root with double slash, as stated by Filipe Silva. Please let us know if it works for you.
Claudio TrajtenbergParticipantPiotr,
Unfortunately the
//test/
solution does not work it yields `<base href=”//test/”> which is interpreted as top level, protocol agnostic, URIFrom Chrome console:
GET http://a2-struts/js/inline.bundle.js net::ERR_NAME_NOT_RESOLVED index:13 GET http://a2-struts/js/polyfills.bundle.js net::ERR_NAME_NOT_RESOLVED index:13 GET http://a2-struts/js/styles.bundle.js net::ERR_NAME_NOT_RESOLVED index:13 GET http://a2-struts/js/vendor.bundle.js net::ERR_NAME_NOT_RESOLVED index:13 GET http://a2-struts/js/main.bundle.js net::ERR_NAME_NOT_RESOLVED a2-struts/favicon.ico:1 GET http://a2-struts/favicon.ico net::ERR_NAME_NOT_RESOLVED
The second suggestion from Felipe does work adding a script and launching it from npm does the trick.
-
AuthorPosts