Carlo
Carlo

Reputation: 401

google closure compiler executed by npx/node/npm

I am trying to compile my client js files with the google closure compiler, and it works well with java:

java -jar node_modules/google-closure-compiler/compiler.jar --js=public/**.js

However, if I try to do the same through node or npx (as documented here), I always get the same error:

npx google-closure-compiler --js=public/**.js
node .\node_modules\google-closure-compiler\cli.js --js=public/**.js

Both return the same error

{ [Error: ENOENT: no such file or directory, open 'D:\myfolder\public\**.js']
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'D:\\myfolder\\public\\**.js' }
TypeError: Cannot read property 'path' of undefined
    at Ird (D:\myfolder\node_modules\google-closure-compiler\jscomp.js:5364:88)
    at Drd (D:\myfolder\node_modules\google-closure-compiler\jscomp.js:7747:257)
...

The path D:\\myfolder\\public\\ is correct

It would be very handy if I could compile all files without installing JRE.

Upvotes: 0

Views: 551

Answers (1)

Chad Killingsworth
Chad Killingsworth

Reputation: 14411

This appears to be a windows specific bug in the cli script. It looks like you have already reported it.

Upvotes: 1

Related Questions