Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 无法在windows server 2008上继续npm安装grunt contrib imagemin_Node.js_Windows Server 2008_Lodash_Yeoman Generator Angular_Grunt Contrib Imagemin - Fatal编程技术网

Node.js 无法在windows server 2008上继续npm安装grunt contrib imagemin

Node.js 无法在windows server 2008上继续npm安装grunt contrib imagemin,node.js,windows-server-2008,lodash,yeoman-generator-angular,grunt-contrib-imagemin,Node.js,Windows Server 2008,Lodash,Yeoman Generator Angular,Grunt Contrib Imagemin,我无法在windows server 2008上安装npm。这种行为很奇怪。请参阅: PS C:\1> npm cache clear PS C:\1> npm install npm WARN package.json 1@0.0.0 No description npm WARN package.json 1@0.0.0 No repository field. npm WARN package.json 1@0.0.0 No README data \ > optipng

我无法在windows server 2008上安装npm。这种行为很奇怪。请参阅:

PS C:\1> npm cache clear
PS C:\1> npm install
npm WARN package.json 1@0.0.0 No description
npm WARN package.json 1@0.0.0 No repository field.
npm WARN package.json 1@0.0.0 No README data
\
> optipng-bin@1.0.1 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!

 > gifsicle@1.0.3 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!

> jpegtran-bin@1.0.2 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 }

 > pngquant-bin@1.0.1 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
首先是文件C:\Users\TFSSERVICE\AppData\Roaming\npm cache\cadb8e19-m-cache-lodash-2-4-1-Package-tgz.lock。请注意短路径,只有c:\1。其次,如果我再次键入npm install,它就会正常工作

PS C:\1> npm install
npm WARN package.json 1@0.0.0 No description
npm WARN package.json 1@0.0.0 No repository field.
npm WARN package.json 1@0.0.0 No README data
grunt@0.4.5 node_modules\grunt
├── dateformat@1.0.2-1.2.3
├── which@1.0.8
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── rimraf@2.2.8
├── colors@0.6.2
├── async@0.1.22
├── grunt-legacy-util@0.2.0
├── hooker@0.2.3
├── exit@0.1.2
├── nopt@1.0.10 (abbrev@1.0.5)
├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
├── lodash@0.9.2
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── js-yaml@2.0.5 (argparse@0.1.16, esprima@1.0.4)
├── grunt-legacy-log@0.1.1 (underscore.string@2.3.3, lodash@2.4.1)
└── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.1)

grunt-wiredep@1.9.0 node_modules\grunt-wiredep
└── wiredep@1.8.6 (propprop@0.3.0, minimist@1.1.0, chalk@0.5.1, through2@0.6.3, glob@4.3.1, lodash@2.4.1, bower-config@0.5.2)
TFSService(运行命令的用户)是本地管理员。它必须立即工作,因为它是由CI服务器运行的,所以不时需要完整的构建

该项目由yeoman的angular generator生成,package.json文件如下所示:

{
     "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"
     }
   }
如果我删除grunt contrib imagemin,它会工作

请参阅:。根据该线程,节点与代理服务器的交互是一个问题。