# Frische Entwicklungsumgebung ab V 5.2.14 unter Vagrant hat Fehler in Gruntfile Zeile 19

**URL:** https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876
**Category:** Programmierung
**Created:** [17. Januar 2017 um 20:22 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876 "2017-01-17T20:22:07Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![zenit](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zenit](https://forum.shopware.com/u/zenit)
#### Post date: [17. Januar 2017 um 20:22 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/1 "2017-01-17T20:22:07Z")

</div>

Hallo,&nbsp;

habe gerade frisch eine neue Entwicklungsumgebung mit Vagrant aufgezogen und alles frisch aus dem Git.&nbsp;

Wenn man den Grunt Task laufen lassen will, meckert die Console an Zeile 19 herum. Dort steht folgendes:&nbsp;

```
config['less'].forEach(function (item) {
        content += `@import "../${item}";`;
    });

```

Ich habe die Zeile einfach durch ein ales Gruntfile überschrieben.&nbsp; **Und hier nochmal die ganze Datei:**

```
module.exports = function (grunt) {
    var shopId = grunt.option('shopId') || 1,
        file = '../web/cache/config_' + shopId + '.json',
        config = grunt.file.readJSON(file),
        lessTargetFile = {},
        jsFiles = [],
        jsTargetFile = {},
        content = '',
        variables = {};

    lessTargetFile['../' + config.lessTarget] = '../web/cache/all.less';

    config['js'].forEach(function (item) {
        jsFiles.push('../' + item);
    });
    jsTargetFile['../' + config.jsTarget] = jsFiles;

    config['less'].forEach(function (item) {
        content += `@import "../${item}";`;
    });
    grunt.file.write('../web/cache/all.less', content);

    for (var key in config.config) {
        variables[key] = config.config[key];
    }

    grunt.initConfig({
        uglify: {
            production: {
                options: {
                    compress: true,
                    preserveComments: false
                },
                files: jsTargetFile
            },
            development: {
                options: {
                    mangle: false,
                    compress: false,
                    beautify: true,
                    preserveComments: 'all'
                },
                files: jsTargetFile
            }
        },
        less: {
            production: {
                options: {
                    compress: true,
                    modifyVars: variables,
                    relativeUrls: true
                },
                files: lessTargetFile
            },
            development: {
                options: {
                    modifyVars: variables,
                    dumpLineNumbers: 'all',
                    relativeUrls: true,
                    sourceMap: true,
                    sourceMapFileInline: true,
                    sourceMapRootpath: '../'
                },
                files: lessTargetFile
            }
        },
        watch: {
            less: {
                files: [
                    '../engine/Shopware/Plugins/**/*.less',
                    '../themes/Frontend/**/*.less',
                    '../custom/plugins/**/*.less'
                ],
                tasks: ['less:development', 'eslint'],
                options: {
                    spawn: false
                }
            },
            js: {
                files: [
                    '../themes/Frontend/**/_public/src/js/*.js',
                    '../engine/Shopware/Plugins/ **/frontend/** /src/js/**/*.js',
                    '../custom/plugins/ **/frontend/** /src/js/**/*.js'
                ],
                tasks: ['uglify:development'],
                options: {
                    spawn: false
                }
            }
        },
        eslint: {
            src: [
                'Gruntfile.js',
                'Frontend/Responsive/frontend/_public/src/js/*.js'
            ]
        }
    });

    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-chokidar');
    grunt.loadNpmTasks('gruntify-eslint');

    grunt.renameTask('chokidar', 'watch');
    grunt.registerTask('production', ['eslint', 'less:production', 'uglify:production']);
    grunt.registerTask('default', ['less:development', 'uglify:development', 'watch']);
};

```

&nbsp;

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [18. Januar 2017 um 07:36 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/2 "2017-01-18T07:36:43Z")

</div>

Hast du auch die configuration gedumpt. Und poste den Fehler

---

<div class="post-metadata">

### Author: ![zenit](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zenit](https://forum.shopware.com/u/zenit)
#### Post date: [18. Januar 2017 um 17:32 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/3 "2017-01-18T17:32:01Z")

</div>

Hi, ja hab gedumpt. Anbei ein Screenshot.

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/7/707fcc78b7f5d9c836ad7894bdff1bb4bd325c95.png)

---

<div class="post-metadata">

### Author: ![frimipiso](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@frimipiso](https://forum.shopware.com/u/frimipiso)
#### Post date: [30. Januar 2017 um 23:17 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/4 "2017-01-30T23:17:30Z")

</div>

Hallo,

ich habe genau das gleiche Problem. Konntest Du eine Lösung finden?

Danke,

Jens

---

<div class="post-metadata">

### Author: ![frimipiso](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@frimipiso](https://forum.shopware.com/u/frimipiso)
#### Post date: [30. Januar 2017 um 23:42 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/5 "2017-01-30T23:42:25Z")

</div>

P.S.: phpstorm beschwert sich über Zeile 19, dass „Import declarations are not supported by current JavaScript version“ (statement expected)

Ich bin streng nach dieser Anleitung vorgegangen:&nbsp;[Using Grunt for theme development](https://developers.shopware.com/designers-guide/best-practice-theme-development/)

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [31. Januar 2017 um 06:47 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/6 "2017-01-31T06:47:36Z")

</div>

Hallo zusammen,

welche Node.js Version habt ihr im Einsatz? Hierbei handelt es sich um ES6 Template Literals, die ab Node v4.3.2 zur Verfügung stehen.

Viele Grüße,  
Stephan

---

<div class="post-metadata">

### Author: ![frimipiso](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@frimipiso](https://forum.shopware.com/u/frimipiso)
#### Post date: [31. Januar 2017 um 07:14 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/7 "2017-01-31T07:14:37Z")

</div>

Hi Stephan,

danke für die Antwort.&nbsp;

&nbsp;

Wo kann ich unter Ubuntu sehen, welche Node.js Version installiert ist?&nbsp;

Wie kann ich die neueste Version installieren? Ich bin nach der Anleitung vorgegangen und dachte, dass automatisch die korrekte Version installiert wird.

Gruss

Jens

&nbsp;

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [31. Januar 2017 um 07:53 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/8 "2017-01-31T07:53:43Z")

</div>

Hey Jens,

in der Konsole kannst du Folgendes eintippen:

```
node -v

```

Ggf. musst du unter Ubuntu Folgendes verwenden:

```
nodejs -v

```

Hier ist eine Anleitung wie du deine Node Installation per Package Manager aktualisierst:

> **[Installing Node.js via package manager | Node.js](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)**
>
> Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Viele Grüße,  
Stephan

---

<div class="post-metadata">

### Author: ![flo.kalango](https://avatars.discourse-cdn.com/v4/letter/f/6a8cbe/32.png) [@flo.kalango](https://forum.shopware.com/u/flo.kalango)
#### Post date: [18. Mai 2017 um 07:41 UTC](https://forum.shopware.com/t/frische-entwicklungsumgebung-ab-v-5-2-14-unter-vagrant-hat-fehler-in-gruntfile-zeile-19/42876/9 "2017-05-18T07:41:50Z")

</div>

Danke, das Aktualisieren hat den fehler behoben.

GRUNT läuft jetzt nun endlich
