-
Notifications
You must be signed in to change notification settings - Fork 655
Webpack fails in deploy.cmd with odd pathing error #2032
Comments
Using a globally installed webpack from
|
Can confirm @deevus's findings, using globally installed Webpack works. Without installing Webpack globally I get a similar issue: |
Not really sure what's going on, by I'm guessing it's getting confused between the two different forms for the same path, e.g.
vs
It ends up appending them instead of correctly resolving the relative ref, resulting in a monster path (note how
The key would be to identify how it ends up with long paths like |
I had the following in my ASP.NET Core project.json, the default from the aspnetcore-spa generator from https://github.com/aspnet/JavaScriptServices: "scripts": {
"prepublish": [
"npm install",
"node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js",
"node node_modules/webpack/bin/webpack.js"
],
"postpublish": [
"dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
]
}, But I got a message saying it couldn't find the Then I tried using a relative path but I get the following similar error messages as the OP: "prepublish": [
"npm install",
"node ../../wwwroot/node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js",
"node ../../wwwroot/node_modules/webpack/bin/webpack.js"
]
These are probably two related issues, but if I fixed the issue we're discussing here I would at least be able to deploy. |
Is this with Node 6.2.2 or later? If so, it sounds related to http://stackoverflow.com/questions/38580186/issue-running-node-app-on-azure-app-service-with-engines-greater-than-6-0-0 and nodejs/node#7294 |
Yes! It's working with |
Hi If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure: This way we can better track and assist you on this case Thanks, Joaquin Vano |
Preface: npm/npm#12931
I thought that my issue would be solved by running webpack directly from
deploy.cmd
, but I get the same output as linked. I was also able to get it to fail in the Kudu Powershell console by running the local webpack copy usingnode
However, if I install a global version of webpack in the console, it works
I'm going to try to use a global version of webpack in deploy.cmd and report back.
The text was updated successfully, but these errors were encountered: