{"action":"created","issue":{"url":"https://api.github.com/repos/markstory/asset_compress/issues/231","labels_url":"https://api.github.com/repos/markstory/asset_compress/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/markstory/asset_compress/issues/231/comments","events_url":"https://api.github.com/repos/markstory/asset_compress/issues/231/events","html_url":"https://github.com/markstory/asset_compress/issues/231","id":53679652,"number":231,"title":"uglifyjs on windows","user":{"login":"Pablushka","id":1197279,"avatar_url":"https://avatars.githubusercontent.com/u/1197279?v=3","gravatar_id":"","url":"https://api.github.com/users/Pablushka","html_url":"https://github.com/Pablushka","followers_url":"https://api.github.com/users/Pablushka/followers","following_url":"https://api.github.com/users/Pablushka/following{/other_user}","gists_url":"https://api.github.com/users/Pablushka/gists{/gist_id}","starred_url":"https://api.github.com/users/Pablushka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pablushka/subscriptions","organizations_url":"https://api.github.com/users/Pablushka/orgs","repos_url":"https://api.github.com/users/Pablushka/repos","events_url":"https://api.github.com/users/Pablushka/events{/privacy}","received_events_url":"https://api.github.com/users/Pablushka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-07T20:42:36Z","updated_at":"2015-01-08T03:25:38Z","closed_at":null,"body":"I have some problems running uglifyjs in my windows machine (Win 7 Utimate 32bits) and assets_compress. The error is the following:\r\n\r\n    PS D:\\wamp\\www\\mysite> .\\Console\\cake AssetCompress.AssetCompress build\r\n    \r\n    \r\n    Welcome to CakePHP v2.6.0 Console\r\n    ---------------------------------------------------------------\r\n    App : mysite\r\n    Path: D:\\wamp\\www\\mysite\\\r\n    ---------------------------------------------------------------\r\n    \r\n    Building files defined in the ini file\r\n    ---------------------------------------------------------------\r\n    Saving file for libs.js\r\n    Error: C:\\Users\\Pablushka\\AppData\\Roaming\\npm\\uglifyjs:2\r\n    basedir=`dirname \"$0\"`\r\n            ^\r\n    SyntaxError: Unexpected token ILLEGAL\r\n        at Module._compile (module.js:439:25)\r\n        at Object.Module._extensions..js (module.js:474:10)\r\n        at Module.load (module.js:356:32)\r\n        at Function.Module._load (module.js:312:12)\r\n        at Function.Module.runMain (module.js:497:10)\r\n        at startup (node.js:119:16)\r\n        at node.js:906:3\r\n    Skip building all.css existing file is still fresh.\r\n    \r\n    Building files in views\r\n    ---------------------------------------------------------------\r\n\r\nRunning uglifyjs in command line (I'm using powershell) just run fine: \r\n\r\n    PS D:\\wamp\\www\\mysite\\webroot\\js> uglifyjs -o .\\modal.min.js .\\modal.js\r\n\r\nI get the correct compressed modal.min.js as spected, so I believe node and uglify are installed properly.\r\n\r\nMy asset_compress.ini file looks this way:\r\n\r\n    [General]\r\n    cacheConfig = false\r\n    alwaysEnableController = false\r\n    \r\n    [js]\r\n    ;baseUrl = http://cdn.example.com\r\n    timestamp = false\r\n    paths[] = WEBROOT/js/*\r\n    cachePath = WEBROOT/cache_js\r\n    ;filters[] = Sprockets\r\n    ;filters[] = YuiJs\r\n    filters[] = UglifyJs\r\n    \r\n    [filter_UglifyJs]\r\n    node = C:\\Program Files\\nodejs\\node.exe\r\n    node_path = node_modules\\uglify-js\\bin\r\n    uglify = C:\\Users\\Pablushka\\AppData\\Roaming\\npm\\uglifyjs\r\n    \r\n    [filter_CssMinFilter]\r\n    path = natxet/CssMin/src/CssMin.php\r\n    \r\n    [libs.js]\r\n    files[] = jquery.js\r\n    files[] = jquery.easing.1.3.js\r\n    files[] = jquery.equalheights.js\r\n    files[] = jquery.isotope.min.js\r\n    files[] = jquery.mobile.customized.min.js\r\n    files[] = jquery.mobilemenu.js\r\n    files[] = jquery.ui.totop.js\r\n    files[] = jquery-migrate-1.2.1.min.js\r\n    files[] = touchTouch.jquery.js\r\n    files[] = bootstrap.min.js\r\n    files[] = bootstrap-filestyle.js\r\n    files[] = camera.js\r\n    files[] = html5shiv.js\r\n    files[] = modal.js\r\n    files[] = superfish.js\r\n    files[] = TMForm.js\r\n    files[] = tm-scripts.js\r\n    files[] = tmstickup.js\r\n    ;filters[] = UglifyJs\r\n    \r\n    \r\n    ; Create the CSS extension\r\n    [css]\r\n    paths[] = WEBROOT/css/*\r\n    cachePath = WEBROOT/cache_css\r\n    filters[] = CssMinFilter\r\n    \r\n    [all.css]\r\n    files[] = touchTouch.css\r\n    files[] = bootstrap.css\r\n    files[] = cake.generic.css\r\n    files[] = camera.css\r\n    files[] = contact-form.css\r\n    files[] = stuck.css\r\n    files[] = style.css\r\n    ;filters[] = CssMinFilter\r\n\r\nI have searched and read all windows related issues here without success. I'm sure this has been solved by another windows user. Any help will be apreciated. Thank you.\r\n"},"comment":{"url":"https://api.github.com/repos/markstory/asset_compress/issues/comments/69131005","html_url":"https://github.com/markstory/asset_compress/issues/231#issuecomment-69131005","issue_url":"https://api.github.com/repos/markstory/asset_compress/issues/231","id":69131005,"user":{"login":"Pablushka","id":1197279,"avatar_url":"https://avatars.githubusercontent.com/u/1197279?v=3","gravatar_id":"","url":"https://api.github.com/users/Pablushka","html_url":"https://github.com/Pablushka","followers_url":"https://api.github.com/users/Pablushka/followers","following_url":"https://api.github.com/users/Pablushka/following{/other_user}","gists_url":"https://api.github.com/users/Pablushka/gists{/gist_id}","starred_url":"https://api.github.com/users/Pablushka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pablushka/subscriptions","organizations_url":"https://api.github.com/users/Pablushka/orgs","repos_url":"https://api.github.com/users/Pablushka/repos","events_url":"https://api.github.com/users/Pablushka/events{/privacy}","received_events_url":"https://api.github.com/users/Pablushka/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T03:25:38Z","updated_at":"2015-01-08T03:25:38Z","body":"No bat file, but a .cmd file instead. So I try this:\r\n\r\n`uglify = C:\\Users\\Pablushka\\AppData\\Roaming\\npm\\uglifyjs.cmd`\r\n\r\nand get the following output:\r\n\r\n\tPS D:\\wamp\\www\\mysite> .\\Console\\cake AssetCompress.AssetCompress build\r\n\t\r\n\t\r\n\tWelcome to CakePHP v2.6.0 Console\r\n\t---------------------------------------------------------------\r\n\tApp : mysite\r\n\tPath: D:\\wamp\\www\\mysite\\\r\n\t---------------------------------------------------------------\r\n\t\r\n\tBuilding files defined in the ini file\r\n\t---------------------------------------------------------------\r\n\tSaving file for libs.js\r\n\tError: C:\\Users\\Pablushka\\AppData\\Roaming\\npm\\uglifyjs.cmd:1\r\n\t(function (exports, require, module, __filename, __dirname) { @IF EXIST \"%~dp0\r\n\t                                                              ^\r\n\tSyntaxError: Unexpected token ILLEGAL\r\n\t    at Module._compile (module.js:439:25)\r\n\t    at Object.Module._extensions..js (module.js:474:10)\r\n\t    at Module.load (module.js:356:32)\r\n\t    at Function.Module._load (module.js:312:12)\r\n\t    at Function.Module.runMain (module.js:497:10)\r\n\t    at startup (node.js:119:16)\r\n\t    at node.js:906:3\r\n\tSaving file for all.css\r\n\t\r\n\tBuilding files in views\r\n\t---------------------------------------------------------------\r\n\r\nRunning a simple test to check cmd file: \r\n\r\n\tPS D:\\wamp\\www\\mysite\\webroot\\js> C:\\Users\\Pablushka\\AppData\\Roaming\\npm\\uglifyjs.cmd -o .\\modal.min.js .\\modal.js\r\n\r\nworks as spected. This is freaking me out...\r\n"}}