I cannot go with npm install on windows server 2008. The behavior is strange. Please see:
PS C:\1> npm cache clear
PS C:\1> npm install
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
\
> [email protected] postinstall C:\1\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin
> node lib/install.js
fetch : https://raw.github.com/imagemin/optipng-bin/v1.0.1/vendor/win/optipng.exe
progress : [====================] 100% 0.0s
? pre-build test passed successfully!
> [email protected] postinstall C:\1\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-gifsicle\node_modules\gifsicle
> node lib/install.js
fetch : https://raw.github.com/imagemin/gifsicle-bin/v1.0.3/vendor/win/x64/gifsicle.exe
progress : [====================] 100% 0.0s
? pre-build test passed successfully!
> [email protected] postinstall C:\1\node_modules\grunt-contrib-Imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin
> node lib/install.js
fetch : https://raw.github.com/imagemin/jpegtran-bin/v1.0.2/vendor/win/x64/jpegtran.exe
progress : [====================] 100% 0.0s
fetch : https://raw.github.com/imagemin/jpegtran-bin/v1.0.2/vendor/win/x64/libjpeg-62.dll
progress : [====================] 100% 0.0s
‼ pre-build test failed, compiling from source...
× { [Error: Command failed: '.' is not recognized as an internal or external command,operable program or batch file.] killed: false, code: 1, signal: null }
> [email protected] postinstall C:\1\node_modules\grunt-contrib-magemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin
> node lib/install.js
fetch : https://raw.github.com/imagemin/pngquant-bin/v1.0.1/vendor/win/pngquant.exe
progress : [====================] 100% 0.0s
? pre-build test passed successfully!
npm ERR! EEXIST, open 'C:\Users\TFSSERVICE\AppData\Roaming\npm-cache\cadb8e19-m-cache-lodash-2-4-1-package-tgz.lock'
File exists: C:\Users\TFSSERVICE\AppData\Roaming\npm-cache\cadb8e19-m-cache-lodash-2-4-1-package-tgz.lock
Move it away, and try again.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\1
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\TFSSERVICE\AppData\Roaming\npm-cache\cadb8e19-m-cache-lodash-2-4-1-Package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0
first, there is file C:\Users\TFSSERVICE\AppData\Roaming\npm-cache\cadb8e19-m-cache-lodash-2-4-1-Package-tgz.lock. Note the short path, just c:\1. secondly, if I type npm install once again, it just works.
PS C:\1> npm install
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
[email protected] node_modules\grunt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])
[email protected] node_modules\grunt-wiredep
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
TFSService (the user that runs the command) is a local administrator. it has to work at once, as it is run by CI Server, so a full build is required from time to time.
The project was generated by yeoman's angular-generator, the package.json file looks like this:
{
"name": "1",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "^0.4.1",
"grunt-autoprefixer": "^0.7.3",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-htmlmin": "^0.3.0",
"grunt-contrib-imagemin": "^0.8.1",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-filerev": "^0.2.1",
"grunt-google-cdn": "^0.4.0",
"grunt-newer": "^0.7.0",
"grunt-ng-annotate": "^0.3.0",
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.1.1",
"grunt-wiredep": "^1.7.0",
"jshint-stylish": "^0.2.0",
"load-grunt-tasks": "^0.4.0",
"time-grunt": "^0.3.1"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test"
}
}
if I remove grunt-contrib-imagemin it works