Fix angular build on windows
krausest opened this issue · 2 comments
krausest commented
Angular currently fails to build on windows (it works on OSX):
D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular>npm run build-prod
> angular-closure@1.0.0 build-prod D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular
> npm run ngc && npm run closure
> angular-closure@1.0.0 ngc D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular
> ngc
> angular-closure@1.0.0 preclosure D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular
> rimraf dist
> angular-closure@1.0.0 closure D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular
> google-closure-compiler --flagfile closure.conf
The compiler is waiting for input via stdin.
Of cource the following command doesn't build:
D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular>node_modules\.bin\google-closure-compiler --flagfile closure.conf
The compiler is waiting for input via stdin.
I tried to pass the contents of the closure.conf contents on the command line, but had no luck:
D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular>node_modules\.bin\google-closure-compiler --compilation_level=ADVANCED_OPTIMIZATIONS --language_out=ES5 --output_wrapper="(function() {%output%}).call(this);" --js_output_file=dist/bundle.js --output_manifest=dist/manifest.MF --variable_renaming_report=dist/variable_renaming_report --property_renaming_report=dist/property_renaming_report --create_source_map=%outname%.map --warning_level=QUIET --dependency_mode=STRICT --rewrite_polyfills=false --jscomp_off=checkVars --module_resolution=node --process_common_js_modules --package_json_entry_names=es2015 node_modules/zone.js/dist/zone_externs.js --js node_modules/rxjs/package.json --js node_modules/rxjs/_esm2015/index.js --js node_modules/rxjs/_esm2015/internal/**.js --js node_modules/rxjs/operators/package.json --js node_modules/rxjs/_esm2015/operators/index.js --js node_modules/@angular/core/package.json --js node_modules/@angular/core/fesm2015/core.js --js node_modules/@angular/core/src/testability/testability.externs.js --js node_modules/@angular/common/package.json --js node_modules/@angular/common/fesm2015/common.js --js node_modules/@angular/compiler/package.json --js node_modules/@angular/compiler/fesm2015/compiler.js --js node_modules/@angular/platform-browser/package.json --js node_modules/@angular/platform-browser/fesm2015/platform-browser.js --js tmp/**.js --entry_point=./tmp/src/main
{ Error: java.lang.RuntimeException: Unhandled flag: outputManifest
at aP.FM [as rg] (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:8459:23322)
at aP.IM [as tg] (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:8459:23517)
at aP.DM (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:2581:48)
at aP.LM (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:739:19)
at new aP (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:737:19)
at LDd (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:8332:132)
at rP (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:2040:29)
at uP (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:3537:44)
at D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:3763:46
at CompilerJS.run (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler\lib\node\closure-compiler-js.js:54:17)
at getFilesFromStdin.then.inputFiles (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler\cli.js:164:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:236:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:560:3)
'__java$exception':
{ g: null,
e: 'Unhandled flag: outputManifest',
backingJsObject: [Circular] } }
Then I tried to remove (possibly) uneccesary parameters but didn't get much further than that:
D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular>node_modules\.bin\google-closure-compiler --compilation_level=ADVANCED_OPTIMIZATIONS --language_out=ES5 --output_wrapper="(function() {%output%}).call(this);" --js_output_file=dist/bundle.js --module_resolution=node --process_common_js_modules --package_json_entry_names=es2015 --js tmp\**.js --entry_point=./tmp/src/main
{ Error: ENOENT: no such file or directory, open 'tmp\**.js'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:348:35)
at RDd (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:6781:186)
at LDd (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:8332:451)
at rP (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:2040:29)
at uP (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:3537:44)
at D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler-js\jscomp.js:3763:46
at CompilerJS.run (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler\lib\node\closure-compiler-js.js:54:17)
at getFilesFromStdin.then.inputFiles (D:\stef\Source\js-framework-benchmark\frameworks\keyed\angular\node_modules\google-closure-compiler\cli.js:164:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:236:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:560:3)
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'tmp\\**.js' }
Of course the js files are available in tmp/src.
What can we do to fix the build?
krausest commented
@trotyl Would be very nice if you could take a look at that issue. I'm running out of ideas.
krausest commented
I'm closing this issue since we're moving to a docker based build.