Path case issue with aspnet-webpack #899

Closed
opened 2025-08-09 17:18:06 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @waynebrantley on 3/24/2017

ReactSpa Template
Webpack 2.3.1
Node 7.7.4
Npm 4.1.2

Run webpack, everything works fine.

Run F5 from VSCode I get an error.
The error is configuration.output.path: The provided value "c:\\Projects\\Templates\\ReactReduxSpa\\wwwroot\\dist" is not an absolute path!

This is of course an absolute path and it is valid.
The problem is the lower case c for the drive letter.

As a test, I changed webpack to

        output: {
            path: path.join(__dirname.ToUpperCase(), bundleOutputDir),
            filename: '[name].js',
            publicPath: '/dist/'
        },

It it now works. Of course, this is not a fix and would break on a mac/linux flavor....but this was just to prove that was the issue. Again, running webpack from command line does not have that issue, so it has to do with calling it all through aspnet-webpack?

*Originally created by @waynebrantley on 3/24/2017* ReactSpa Template Webpack 2.3.1 Node 7.7.4 Npm 4.1.2 Run webpack, everything works fine. Run F5 from VSCode I get an error. The error is `` configuration.output.path: The provided value "c:\\Projects\\Templates\\ReactReduxSpa\\wwwroot\\dist" is not an absolute path!`` This is of course an absolute path and it is valid. The problem is the **lower case** ``c`` for the drive letter. As a test, I changed webpack to ``` output: { path: path.join(__dirname.ToUpperCase(), bundleOutputDir), filename: '[name].js', publicPath: '/dist/' }, ``` It it now works. Of course, this is not a fix and would break on a mac/linux flavor....but this was just to prove that was the issue. Again, running webpack from command line does not have that issue, so it has to do with calling it all through aspnet-webpack?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#899
No description provided.