简体   繁体   中英

Closure Compiler: ERROR - cannot read

I downloaded Google Closure Compiler from official Google website ( https://developers.google.com/closure/compiler/docs/gettingstarted_app ). And then run it to minify my widget.js but i received the error below:

C:\\Users\\Administrator\\Downloads\\compiler-latest>java -jar compiler.jar --js "wi dget.js" \\ --js_output_file "output.js" ERROR - Cannot read: \\

1 error(s), 0 warning(s)

在此处输入图片说明

I tried to change my widget.js content, if the widget.js contain some syntax error it will tell me know. But it seem that the "error - CANNOT READ \\" always show up even my widget.js is empty or just have a line alert('test');

How can i resolve that error?

You should run your compiler as following:

java -jar compiler.jar --js widget.js --js_output_file output.js

You can put multi js files and seperate by a space without double quote ("), single quote (') or slash (/) like your case.

Hope this help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM