{"id":2843,"date":"2014-02-24T00:41:09","date_gmt":"2014-02-24T00:41:09","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/24\/concat-error-using-grunt-js-collection-of-common-programming-errors\/"},"modified":"2014-02-24T00:41:09","modified_gmt":"2014-02-24T00:41:09","slug":"concat-error-using-grunt-js-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/02\/24\/concat-error-using-grunt-js-collection-of-common-programming-errors\/","title":{"rendered":"concat error using grunt.js-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying out grunt.js for the first time and am having some beginner issues.<\/p>\n<p>I want to concat all the js files in the \/foundation\/ folder<\/p>\n<p>I&#8217;m getting this error:<\/p>\n<pre><code>Running \"concat:options\" (concat) task\n\nTypeError: Cannot read property 'linefeed' of undefined\nat Object.module.exports (....file path here.....\/_compass\/javascripts\/node_modules\/grunt-contrib-concat\/tasks\/concat.js:19:28)\nat Object.task.registerMultiTask.thisTask (\/usr\/local\/lib\/node_modules\/grunt\/lib\/grunt\/task.js:109:15)\nat Object.task.registerTask.thisTask.fn (\/usr\/local\/lib\/node_modules\/grunt\/lib\/grunt\/task.js:58:16)\nat Task. (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:343:36)\nat Task. (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:319:9)\nat Task. (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:346:11)\nat Task. (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:319:9)\nat Task. (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:346:11)\nat Task.start (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:359:5)\nat Object.grunt.tasks (\/usr\/local\/lib\/node_modules\/grunt\/lib\/grunt.js:143:8)\n<\/code><\/pre>\n<p>my grunt file looks like this<\/p>\n<pre><code>module.exports = function(grunt) {\n\n\/\/ Project configuration.\ngrunt.initConfig({\n\n    \/\/ Read in the project settings from the package.json file\n    pkg: grunt.file.readJSON('package.json'),\n\n\n    concat: {\n        options: {\n            separator: ';'\n        },\n        dist: {\n            src: ['foundation\/*.js'],\n            dest: 'dist\/.js'\n        }\n    },\n\n\n});\n\n\/\/ Load the plugin that provides the \"concat\" task.\ngrunt.loadNpmTasks('grunt-contrib-concat');\n\n\/\/ Default task(s).\ngrunt.registerTask('default', ['concat']);\n<\/code><\/pre>\n<p>};<\/p>\n<p>any help would be appreciated<\/p>\n<ol>\n<li>\n<p>To fix this issue, I uninstalled grunt, installed the latest release candidate, cleared the cache with npm cache clean and installed the latest release candidate of the concat module. It&#8217;s working now.<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying out grunt.js for the first time and am having some beginner issues. I want to concat all the js files in the \/foundation\/ folder I&#8217;m getting this error: Running &#8220;concat:options&#8221; (concat) task TypeError: Cannot read property &#8216;linefeed&#8217; of undefined at Object.module.exports (&#8230;.file path here&#8230;..\/_compass\/javascripts\/node_modules\/grunt-contrib-concat\/tasks\/concat.js:19:28) at Object.task.registerMultiTask.thisTask (\/usr\/local\/lib\/node_modules\/grunt\/lib\/grunt\/task.js:109:15) at Object.task.registerTask.thisTask.fn (\/usr\/local\/lib\/node_modules\/grunt\/lib\/grunt\/task.js:58:16) at Task. (\/usr\/local\/lib\/node_modules\/grunt\/lib\/util\/task.js:343:36) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2843","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2843"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2843\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}