0
votes

I am trying to deploy my asp.net 5 mvc application to azure. First time I faced this error:

Deployment template validation failed: 'The provided value for the template parameter 'sku' at line '16' and column '17' is not valid.'.

Fixed it by creating web app in azure portal instead from visual studio.

Now I have this error:

Error EPERM, open 'C:\Windows\npm-debug.log' MapApp DNU 0

Cant find the solution of this problem , I tried to clean and rebuild my project, reopen visual studio. Also when I launch my app in local mode all is fine (i.e. no errors appears ).

P.S. Full error stack:

------ Publish started: Project: MapApp, Configuration: Release Any CPU ------ Environment variables: Path=\Mac\Home\Desktop\Work\DemoApps\MapApp\Server\MapApp\src\MapApp\node_modules.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\NativeBinaries\x86;C:\Program Files (x86)\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\system32\config\systemprofile.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Users\max.dnx\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external.git C:\Users\max.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\dnu.cmd publish "\Mac\Home\Desktop\Work\DemoApps\MapApp\Server\MapApp\src\MapApp" --out "C:\Users\max\AppData\Local\Temp\PublishTemp" --configuration Release --runtime dnx-clr-win-x86.1.0.0-beta5 --wwwroot-out "wwwroot" --quiet '\Mac\Home\Desktop\Work\DemoApps\MapApp\Server\MapApp\src\MapApp' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. Microsoft .NET Development Utility CLR-x86-1.0.0-beta5-12103 Executing script 'prepublish' in project.json '\Mac\Home\Desktop\Work\DemoApps\MapApp\Server\MapApp\src\MapApp' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. npm ERR! install Couldn't read dependencies

npm ERR! package.json ENOENT, open 'C:\Windows\package.json'

npm ERR! package.json This is most likely not a problem with npm itself.

npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Windows_NT 6.2.9200

npm ERR! command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\\node\node" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm\bin\npm-cli.js" "install" npm ERR! cwd C:\Windows

npm ERR! node -v v0.10.31

npm ERR! npm -v 1.4.9

npm ERR! path C:\Windows\package.json

npm ERR! code ENOPACKAGEJSON

npm ERR! errno 34

DNU(0,0): Error : EPERM, open 'C:\Windows\npm-debug.log'

npm ERR! { [Error: EPERM, open 'C:\Windows\npm-debug.log'] errno: 50, code: 'EPERM', path: 'C:\Windows\npm-debug.log' } npm ERR!

npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Windows_NT 6.2.9200

npm ERR! command "C:\Program Files (x86)\Microsoft Visual Studio

14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\\node\node" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\npm\node_modules\npm\bin\npm-cli.js" "install"

npm ERR! cwd C:\Windows

npm ERR! node -v v0.10.31

npm ERR! npm -v 1.4.9

npm ERR! path C:\Windows\npm-debug.log

npm ERR! code EPERM

npm ERR! errno 50

DNU(0,0): Error : EPERM, open 'C:\Windows\npm-debug.log'

The 'prepublish' script failed with status code 34.

2
I found this in another thread: stackoverflow.com/a/30709471/5325148Danieboy
I fixed this error. Now I have another.Panich Maxim

2 Answers

1
votes

@Panich, I haven't seen that error myself so it will be hard to reproduce on my end.

I would suggest the following: create a new blank ASP.NET 5 web app, and deploy it to a test site on Azure. Add a few things to it, from your own application and redeploy it a couple of more times to see if it fails after adding any particular item.

Hope that helps you narrow down the issue.

0
votes

I have just started with ASP.NET 5 and tried to create a self-hosted application. Thereby (by deploy the app to a directory) I also had the error:

EPERM, open 'C:\Windows\npm-debug.log'       

I then have noted, that to deploy a project from a network share seems not to be supported "out-of-the-box" (I think, there are some special settings / configurations to do, to make it work). Therefore, I have copied the project from the network-share to a local drive and then was able to deploy it. So.. I would try to copy the project to a local drive...

Link to my posting to the self-hosting: ASP.NET5 self-hosting, change localhost