benhoIIand / grunt-cache-bust

Cache bust static assets using content hashing
MIT License
265 stars 103 forks source link

When runngin Grunt : SyntaxError: Unexpected token ... #242

Open paulgrant opened 6 years ago

paulgrant commented 6 years ago

When running the cachebuild ("grunt-cache-bust": "~1.7.0",) task I am getting the following:

Warning: Task "cacheBust" not found. Use --force to continue.

In the log console when using -v on grunt. Registering "grunt-cache-bust" local Npm module tasks. Reading [PROJECT]node_modules\grunt-cache-bust\package.json...OK Parsing [PROJECT]node_modules\grunt-cache-bust\package.json...OK Loading "cachebust.js" tasks...ERROR

SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load ([PROJECT]node_modules\grunt\node_modules\coffeescript\lib\coffee-script\register.js:45:36) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. ([PROJECT]node_modules\grunt-cache-bust\node_modules\fs-extra\lib\index.js:6:3) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load ([PROJECT]node_modules\grunt\node_modules\coffeescript\lib\coffee-script\register.js:45:36) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. ([PROJECT]node_modules\grunt-cache-bust\tasks\cachebust.js:3:10) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load ([PROJECT]node_modules\grunt\node_modules\coffeescript\lib\coffee-script\register.js:45:36) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at loadTask ([PROJECT]node_modules\grunt\lib\grunt\task.js:313:10) at [PROJECT]node_modules\grunt\lib\grunt\task.js:351:7 at Array.forEach (native) at loadTasks ([PROJECT]node_modules\grunt\lib\grunt\task.js:350:11) at Task.task.loadNpmTasks ([PROJECT]node_modules\grunt\lib\grunt\task.js:398:5) at Object.module.exports ([PROJECT]GruntFile.js:19:11) at loadTask ([PROJECT]node_modules\grunt\lib\grunt\task.js:315:10) at Task.task.init ([PROJECT]node_modules\grunt\lib\grunt\task.js:434:5) at Object.grunt.tasks ([PROJECT]node_modules\grunt\lib\grunt.js:111:8) at Object.module.exports [as cli] ([PROJECT]node_modules\grunt\lib\grunt\cli.js:27:9) at Object. (C:\Users\grantp\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt:44:20) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3

yarhouse commented 6 years ago

I also have this issue. Set the version back to 1.6.0 as an immediate fix