Chris
Chris

Reputation: 1883

Webpack error when project shared across 2 machines

I have my project saved in a Google Drive folder. It works fine on one of my machines, but on the other I get a bunch of errors when it tries to compile my code. They're all the same error and appear to be related to loading images - here's an example below (the others are all the same, just for different images)

    ERROR in ./app/images/profilePics/blankface.jpg
Module build failed: Error: spawn EACCES
    at exports._errnoException (util.js:1050:11)
    at ChildProcess.spawn (internal/child_process.js:319:11)
    at Object.exports.spawn (child_process.js:378:9)
    at module.exports (/Users/Chris/Google Drive/AcademyReact/node_modules/execa/index.js:130:26)
    at fsP.writeFile.then (/Users/Chris/Google Drive/AcademyReact/node_modules/exec-buffer/index.js:35:15)
 @ ./app/admin/components/SideMenu.js 53:12-61

It only seems to apply to image loaders - I'm not getting any other errors.

Here's my config file:

var webpack = require('webpack');
var path = require('path');
var nodeModulesPath = path.resolve(__dirname, 'node_modules');
var buildPath = path.resolve(__dirname, 'public');
var mainPath = path.resolve(__dirname, 'app', 'main.js');

var config = {

    devtool: 'source-map',
    devServer: {
      historyApiFallback: true
    },
    entry: [

        'webpack/hot/dev-server',
        'webpack-hot-middleware/client',
        'whatwg-fetch',
        //Our application
        mainPath
    ],
    output: {
        path: '/',
        publicPath: 'http://localhost:3000/',
        //assetsPublicPath: 'http://localhost:3000/',
        filename: 'bundle.js'
    },
    module: {
        loaders: [
            {
                test: /\.js?$/,
                loader: 'babel',
                exclude: nodeModulesPath
            },
            {
                test: /\.css$/,
                loader: 'style!css?sourceMap&modules!postcss?sourceMap'
            },
            {
                test: /\.(jpe?g|png|gif|svg)$/i,
                loaders: [
                  'file?hash=sha512&digest=hex&name=[hash].[ext]',
                  'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
                ]
            },
            {
                test: /\.html$/,
                loader: 'html-loader?attrs[]=video:src'
            }, 
            {
                test: /\.mp4$/,
                loader: 'url?limit=10000&mimetype=video/mp4'
            }

        ]
    },
    postcss: [
        require('autoprefixer'),
        require('precss')
    ],
    plugins: [
        new webpack.HotModuleReplacementPlugin()
    ]
};

module.exports = config;

Any ideas?

Upvotes: 0

Views: 132

Answers (1)

botika
botika

Reputation: 503

Module build failed: Error: spawn EACCES, That is a problem of permissions.

Upvotes: 1

Related Questions