M
M
Mikhail Smirnov2017-09-07 19:41:20
npm
Mikhail Smirnov, 2017-09-07 19:41:20

Error while building js gulp?

Module build failed
: TypeError: fileSystem.statSync is not a function
9ca2603e4563402997b10508daf6385c.png
gulpfile.js

const elixir = require('laravel-elixir');

require('laravel-elixir-vue');

elixir.config.sourcemaps = true;

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(mix =>
    {
        var
            assets       = 'resources/assets/',
        node_modules = '../../../node_modules/';

        mix
            .sass('app.scss', 'public/css/app.css')

            .copy(assets + 'images', 'public/images')
            .copy(node_modules + 'materialize-css/fonts', 'public/build/fonts')

            .webpack('app.js')

            /*
             * Version
             */
            .version(
                [
                    'css/app.css',
                    'js/app.js'
                ]
            );
    }
);

app.js
/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');
var VueResource = require('vue-resource');
var VueAsyncData = require('vue-async-data');

Vue.use(VueResource);
Vue.use(VueAsyncData);

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

Vue.component('example', require('./components/Example.vue'));

const app = new Vue({
    el: '#app'
});

[email protected]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question