将部署NodeJS应用程序部署到Azure网站无法从deploy.cmd从packages.json安装NPM软件包?

时间:2014-10-06 13:25:26

标签: git azure deployment sails.js waterline

我正试图使用​​.deployment& amp;将本地GIT存储库推送到我的Azure网站。 deploy.cmd。

问题是,当脚本尝试安装NPM软件包时,安装大约一半后它会失败。我已经尝试了很多东西,但无法让它发挥作用。

如果你们中任何人知道为什么这不起作用,我会赞不绝口。

这是我的代码:

的package.json

{
  "name": "api",
  "private": true,
  "version": "0.1.0",
  "description": "Backend API",
  "keywords": [],
  "main": "app.js",
  "repository": "",
  "author": "Frej (frej@example.com)",
  "license": "",
  "scripts": {
    "start": "node app.js",
    "debug": "node debug app.js"
  },
  "devDependencies": {
    "grunt": "0.4.5",
    "grunt-contrib-watch": "~0.6.1"
  },
  "dependencies": {
    "bcrypt-nodejs": "0.0.3",
    "include-all": "~0.1.2",
    "jwt-simple": "~0.2.0",
    "mandrill-api": "~1.0.40",
    "passport": "~0.2.1",
    "passport-http-bearer": "~1.0.1",
    "sails": "~0.10.5",
    "sails-mongo": "~0.10.4",
    "validator": "~3.18.0"
  }
}

.deployment

[config]
command = deploy.cmd

Deploy.cmd

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.5
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_DIST (
  SET DEPLOYMENT_DIST=%~dp0%dist\prod
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm --registry "http://registry.npmjs.org/" install kudusync -g
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=node "%appdata%\npm\node_modules\kuduSync\bin\kuduSync"
)

IF NOT DEFINED GRUNT_CMD (
  :: Install grunt
  echo Installing Grunt
  call npm --registry "http://registry.npmjs.org/" install grunt-cli
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "grunt" would also work
  SET GRUNT_CMD=node "%appdata%\npm\node_modules\grunt-cli\bin\grunt"

)


goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm --registry "http://registry.npmjs.org/"
  SET NODE_EXE=node
)

goto :EOF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

:Deployment
echo Handling node.js deployment.
echo %DEPLOYMENT_SOURCE%

:: 1. Select node version
call :SelectNodeVersion

:: 2. Install npm packages
echo Installing npm dev dependendencies
if EXIST "%DEPLOYMENT_SOURCE%\package.json" (
  pushd %DEPLOYMENT_SOURCE%
  echo Cleaning NPM cache.
  call !NPM_CMD! cache clean
  call !NPM_CMD! install --development
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 3. Run grunt prod task
pushd %DEPLOYMENT_SOURCE%
call !GRUNT_CMD! prod
popd

:: 4. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_DIST%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 5. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd %DEPLOYMENT_TARGET%
  call !NPM_CMD! install --production
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
call %POST_DEPLOYMENT_ACTION%
IF !ERRORLEVEL! NEQ 0 goto error

goto end

:error
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
echo Finished successfully.

以下是Azure门户部署的日志

Command: deploy.cmd
Installing Grunt
npm WARN package.json api@0.1.0 No README.md file found!
npm http GET http://registry.npmjs.org/grunt-cli
npm http 200 http://registry.npmjs.org/grunt-cli
npm http GET http://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz

*... A lot of successful package installs, removed due to character limits ...*

npm http 200 http://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz
npm http 200 http://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz
npm WARN prefer global grunt-cli@0.1.13 should be installed with -g
grunt-cli@0.1.13 node_modules\grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.5)
└── findup-sync@0.1.3 (lodash@2.4.1, glob@3.2.11)
Handling node.js deployment.
D:\home\site\repository
Using start-up script app.js from package.json.
Generated web.config.
The package.json file does not specify node.js engine version constraints.
The node.js application will run with the default node.js version 0.10.5.
Installing npm dev dependendencies
Cleaning NPM cache.
npm WARN package.json api@0.1.0 No README.md file found!
npm http GET https://registry.npmjs.org/sails
npm http GET https://registry.npmjs.org/grunt/0.4.5
npm http 200 https://registry.npmjs.org/grunt/0.4.5

*... A lot of successful package installs, removed due to character limits ...*

npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/maxmin/-/maxmin-0.1.0.tgz
npm WARN deprecated grunt-lib-contrib@0.7.1: DEPRECATED. See readme: https://github.com/gruntjs/grunt-lib-contrib
npm http GET https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz

*... A lot of successful package installs, removed due to character limits ...*

npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.7.1.tgz
npm http 200 https://registry.npmjs.org/uglify-js
npm ERR! Error: ENOENT, chmod 'D:\home\site\repository\node_modules\sails\node_modules\i18n\.travis.yml'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\i18n\.travis.yml
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\i18n\.travis.yml
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'D:\home\site\repository\node_modules\sails\node_modules\semver'
npm ERR! error rolling back  sails@0.10.5 { [Error: ENOTEMPTY, rmdir 'D:\home\site\repository\node_modules\sails\node_modules\semver']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'D:\\home\\site\\repository\\node_modules\\sails\\node_modules\\semver' }
npm ERR! Error: No compatible version found: chalk@'^0.4.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.1.1","0.2.0","0.2.1","0.3.0","0.4.0","0.5.0","0.5.1"]
npm ERR!     at installTargetsError (D:\Program Files (x86)\npm\1.2.18\node_modules\npm\lib\cache.js:685:10)
npm ERR!     at D:\Program Files (x86)\npm\1.2.18\node_modules\npm\lib\cache.js:607:10
npm ERR!     at RegClient.get_ (D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\npm-registry-client\lib\get.js:101:14)
npm ERR!     at RegClient.<anonymous> (D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\npm-registry-client\lib\get.js:37:12)
npm ERR!     at fs.js:266:14
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\prompt\examples\simple-prompt.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\prompt\examples\simple-prompt.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\prompt\examples\simple-prompt.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\captains-log\test\basic.test.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\captains-log\test\basic.test.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\captains-log\test\basic.test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\grunt-contrib-watch\docs\watch-examples.md'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\grunt-contrib-watch\docs\watch-examples.md
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\grunt-contrib-watch\docs\watch-examples.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, chmod 'D:\home\site\repository\node_modules\sails\node_modules\fs-extra\lib\remove.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\fs-extra\lib\remove.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\fs-extra\lib\remove.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, open 'D:\home\site\repository\node_modules\sails\node_modules\express-handlebars\lib\utils.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\express-handlebars\lib\utils.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\sails-generate\lib\util.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\sails-generate\lib\util.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\sails-generate\lib\util.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\anchor\lib\match\rules.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\anchor\lib\match\rules.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\anchor\lib\match\rules.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\ejs\lib\ejs.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\ejs\lib\ejs.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\ejs\lib\ejs.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/waterline-criteria
npm http GET https://registry.npmjs.org/waterline-errors
npm http GET https://registry.npmjs.org/waterline-cursor
npm ERR! Error: ENOENT, open 'D:\home\site\repository\node_modules\sails\node_modules\skipper\lib\Parser\Parser.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\skipper\lib\Parser\Parser.js
npm ERR! code ENOENT
npm ERR! errno 34
npm http GET https://registry.npmjs.org/promised-io/-/promised-io-0.3.3.tgz
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\waterline\lib\waterline.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\waterline\lib\waterline.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\waterline\lib\waterline.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\semver\semver.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\semver\semver.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\semver\semver.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 200 https://registry.npmjs.org/waterline-cursor
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\grunt\lib\grunt\file.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\grunt\lib\grunt\file.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\grunt\lib\grunt\file.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 200 https://registry.npmjs.org/promised-io/-/promised-io-0.3.3.tgz
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\express\History.md'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\express\History.md
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\express\History.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\sails-util\docs\cli.html'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\sails-util\docs\cli.html
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\sails-util\docs\cli.html
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/waterline-cursor/-/waterline-cursor-0.0.5.tgz
npm http 200 https://registry.npmjs.org/waterline-errors
npm http 200 https://registry.npmjs.org/waterline-criteria
npm ERR! Error: ENOENT, lstat 'D:\home\site\repository\node_modules\sails\node_modules\async\lib\async.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
 npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.5\\node.exe" "D:\\Program Files (x86)\\npm\\1.2.18\\node_modules\\npm\\bin\\npm-cli.js" "install" "--development"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! path D:\home\site\repository\node_modules\sails\node_modules\async\lib\async.js
npm ERR! fstream_path D:\home\site\repository\node_modules\sails\node_modules\async\lib\async.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack D:\Program Files (x86)\npm\1.2.18\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/waterline-errors/-/waterline-errors-0.10.1.tgz
npm http GET https://registry.npmjs.org/waterline-criteria/-/waterline-criteria-0.10.7.tgz
npm http 200 https://registry.npmjs.org/waterline-cursor/-/waterline-cursor-0.0.5.tgz
npm http 200 https://registry.npmjs.org/waterline-criteria/-/waterline-criteria-0.10.7.tgz
npm http 200 https://registry.npmjs.org/waterline-errors/-/waterline-errors-0.10.1.tgz

A lot more of the same errors...

npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm

2 个答案:

答案 0 :(得分:1)

我将错误追踪到2个NPM包,帆和帆 - mongo。 Azure网站不支持使用node-gyp和/或python的软件包。

为了解决这个问题,我将整个node_modules地图添加到GIT跟踪并将其推送到Azure网站并且它有效!

答案 1 :(得分:1)

一段时间过去了,但有些人可能还会遇到这个问题。请参阅以下主题node.js app with node-gyp fails to deploy on azure website中的答案,在那里您可以找到有关如何使用node-gyp运行来获取包的解决方案,而无需在存储库中包含整个node_modules文件夹。