question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: invalid argument" when starting server with 2.1.0-beta.3

See original GitHub issue

I’m submitting a bug report

webpack and webpack-dev-server version: webpack: 2.1.0-beta.21 webpack-dev-server: 2.1.0-beta.3

Please tell us about your environment: OSX 10.11.6

Current behavior:

When running the webpack-dev-server, I get this error:

webpack-dev-server --hot --progress --history-api-fallback --config webpack/webpack.dev.config.js --content-base html/

 http://localhost:8080/
webpack result is served from /build/
content is served from /Users/evgueni.naverniouk/Git/ux/html
404s will fallback to /index.html
webpack: wait until bundle finished: /build/app.js

/Users/evgueni.naverniouk/Git/ux/node_modules/webpack-dev-middleware/middleware.js:106
            if(err) throw err;
                    ^
Error: invalid argument
    at pathToArray (/Users/evgueni.naverniouk/Git/ux/node_modules/memory-fs/lib/MemoryFileSystem.js:44:10)
    at MemoryFileSystem.mkdirpSync (/Users/evgueni.naverniouk/Git/ux/node_modules/memory-fs/lib/MemoryFileSystem.js:139:13)
    at MemoryFileSystem.(anonymous function) [as mkdirp] (/Users/evgueni.naverniouk/Git/ux/node_modules/memory-fs/lib/MemoryFileSystem.js:279:34)
    at Compiler.<anonymous> (/Users/evgueni.naverniouk/Git/ux/node_modules/webpack/lib/Compiler.js:266:25)
    at Compiler.applyPluginsAsync (/Users/evgueni.naverniouk/Git/ux/node_modules/tapable/lib/Tapable.js:73:70)
    at Compiler.emitAssets (/Users/evgueni.naverniouk/Git/ux/node_modules/webpack/lib/Compiler.js:263:7)
    at Watching.onCompiled (/Users/evgueni.naverniouk/Git/ux/node_modules/webpack/lib/Compiler.js:55:18)
    at /Users/evgueni.naverniouk/Git/ux/node_modules/webpack/lib/Compiler.js:442:12
    at next (/Users/evgueni.naverniouk/Git/ux/node_modules/tapable/lib/Tapable.js:81:11)
    at Compiler.<anonymous> (/Users/evgueni.naverniouk/Git/ux/node_modules/webpack/lib/CachePlugin.js:61:4)

Expected/desired behavior:

Server should not fail to start.

This issue was not happening with 2.1.0-beta.0. Only started happening after upgrading to 2.1.0-beta.3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
EvHauscommented, Sep 7, 2016

Sorry, I take back my previous statement. Changing output.path to / does indeed make the issue go away. My original output.path was set to ./html/build/.

Here is a minimal webpack.config.js that can be used to reproduce the issue:

module.exports = {
    entry: {
        app: ['./html/js/menu.js']
    },
    module: {
        loaders: [
            {test: /\.js$/, loader: 'babel'}
        ]
    },
    output: {
        path: './html/build/',
        publicPath: '/build/',
        filename: '[name].js'
    }
};
0reactions
EvHauscommented, Sep 7, 2016

Confirmed. Using an absolute path resolves the issue. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant run sudo npm install -g typescript - node.js - Stack Overflow
It has nothing to do with Typescript, NPM is telling you that your Webpack version is not compatible with other modules you have,...
Read more >
Command-line utilities fails with error "Invalid argument ...
Command-line utilities fails with error "Invalid argument specified" or "option ... For example, asbman -i asbroker1 -start fails with:
Read more >
Release Notes - Flyway by Redgate • Database Migrations ...
Bug fixes. Fix issue where post schema clean didn't include correct schemas. Clean mode now cleans more schemas for SQL Server integrated authentication...
Read more >
Application Insights for Node.js - applicationinsights - npm
start();. If the instrumentation key is set in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY, .setup() can be called with no arguments ...
Read more >
PHP 5 ChangeLog
Fixed bug #77020 (null pointer dereference in imap_mail). Fixed bug #77153 (imap_open allows to run arbitrary shell commands via mailbox parameter). (CVE-2018- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found