2016-05-16 43 views
0

我正在Kudu的本地版本上运行一些测试,并试图了解如何在kudu将输出的内部版本同步到wwwroot文件夹之前运行gulp构建过程。在本地iis上运行一个gup build in kudu

我的web项目的结构,像这样:

-bower_components/ 
-node_modules/ 
-source/ 
.bowerrc 
.gitignore 
bower.json 
gulpfile.js 
package.json 

运行一饮而尽在项目根生成一个build文件夹中生成。 设置此的原因是为了确保在部署或ftp上载运行时,任何git节点或预编译的源文件都不会在Web上公开。

我无法弄清楚如何获得捻首先运行一饮而尽构建任务,然后才考虑同步后生成输出的内容的wwwroot

我得到以下NPM-的debug.log

0 info it worked if it ends with ok 
1 verbose cli [ 'c:\\Program Files (x86)\\nodejs\\node.exe', 
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 
1 verbose cli 'install' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose stack Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' 
4 verbose stack  at Error (native) 
5 verbose cwd C:\kudu\apps\devsite\site\wwwroot 
6 error Windows_NT 6.3.9600 
7 error argv "c:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
8 error node v4.4.4 
9 error npm v2.15.1 
10 error path C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm 
11 error code EPERM 
12 error errno -4048 
13 error syscall mkdir 
14 error Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm' 
14 error  at Error (native) 
14 error { [Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm'] 
14 error errno: -4048, 
14 error code: 'EPERM', 
14 error syscall: 'mkdir', 
14 error path: 'C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Roaming\\npm' } 
15 error Please try running this command again as root/Administrator. 
16 verbose exit [ -4048, true ] 

而且从部署日志

Updating branch 'master'.,cffcb371-6058-4ec3-aa69-a979ef8976a4,0 
Updating submodules.,500605d6-55df-418c-bae1-1eb6ec24ec10,0 
Preparing deployment for commit id '872c8ef074'.,936863bc-e83f-49ed-950a-cfb67aaaf10f,0 
Generating deployment script.,2e77d73d-517a-47e6-b7da-b46ee6b0a34f,0 
Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "C:\kudu\apps\devsite\site\repository" -o "C:\kudu\apps\devsite\site\deployments\tools" --node --sitePath "C:\kudu\apps\devsite\site\repository"'.,,0 
Generating deployment script for node.js Web Site,,0 
Generated deployment script files,,0 
Running deployment command...,f5250b3f-afeb-455e-bc2e-68f01a7200a0,0 
Command: "C:\kudu\apps\devsite\site\deployments\tools\deploy.cmd",,0 
Handling node.js deployment.,,0 
KuduSync.NET from: 'C:\kudu\apps\devsite\site\repository' to: 'C:\kudu\apps\devsite\site\wwwroot',,0 
Deleting file: 'hostingstart.html',,0 
Copying file: '.bowerrc',,0 
Copying file: '.gitignore',,0 
Copying file: 'bower.json',,0 
Copying file: 'gulpfile.js',,0 
Copying file: 'package.json',,0 
Copying file: 'README.md',,0 
Copying file: 'source\.htaccess',,0 
Copying file: 'source\.htpasswd',,0 
Copying file: 'source\hero-banners.html',,0 
Copying file: 'source\index.html',,0 
Omitting next output lines...,,0 
Invalid start-up command "npm install && bower install" in package.json. Please use the format "node <script relative path>".,,1 
Looking for app.js/server.js under site root.,,0 
Missing server.js/app.js files&comma; web.config is not generated,,1 
The package.json file does not specify node.js engine version constraints.,,0 
The node.js application will run with the default node.js version 4.4.4.,,0 
One or more of the selected node/npm paths do not exist.,,0 
Error: EPERM: operation not permitted&comma; mkdir 'C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\npm',,1 
at Error (native),,1 
,,1 
Finished successfully.,,0 
Deployment successful.,30b733dd-4038-4dbb-b103-b7852c2586c1,0 

我承担一些错误的权限错误,我相信可以在IIS中纠正。

在正确的方向任何帮助将不胜感激

回答

0

我想通了EPERM问题。 在IIS应用程序池标识需要设置为本地系统