Deploying a NodeJS App to Azure Websites fails on installing NPM packages from pagages.json from deploy.cmd?
Asked Answered
N

2

1

I'm trying to push a local GIT repository to my Azure Website using .deployment & deploy.cmd.

The problem is that when the script tries to install NPM packages it fails after about half is installed. I have tried a lot of things but can't get it to work.

I would appriciate if any of you have any idea of why this is not working?

This is my code:

package.json

{
  "name": "api",
  "private": true,
  "version": "0.1.0",
  "description": "Backend API",
  "keywords": [],
  "main": "app.js",
  "repository": "",
  "author": "Frej ([email protected])",
  "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.

And here is the log for the deployment from the Azure portal

Command: deploy.cmd
Installing Grunt
npm WARN package.json [email protected] 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 [email protected] should be installed with -g
[email protected] node_modules\grunt-cli
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
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 [email protected] 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 [email protected]: 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!     <[email protected]>
 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  [email protected] { [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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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!     <[email protected]>
 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
Necessitate answered 6/10, 2014 at 13:25 Comment(0)
N
1

I'v tracked down the error to 2 NPM packages, sails and sails-mongo. They are dependent on packages using node-gyp and/or python wich at the time is not supported in Azure Websites.

To fix this, I added the whole node_modules map to GIT tracking and pushed it to Azure Websites and it worked!

Necessitate answered 7/10, 2014 at 18:53 Comment(0)
S
1

some time has passed but some might still face this issue. Please refer to my answer in the following thread node.js app with node-gyp fails to deploy on azure website where you can find a solution on how to get packages using node-gyp running without having to include the whole node_modules folder in your repository.

Stockstill answered 10/2, 2016 at 21:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.