win8上npm install时出现问题
发布于 1天前 作者 NeverWait 73 次浏览 来自 问答

这个是package.json package.json如下

{
  "repository": {
    "type": "git",
    "url": ""
  },
  "license": "MIT",
  "description": "Project Shijuan",
  "scripts": {
    "start": "node_modules/.bin/webpack-dev-server --config conf/webpack.config.js --progress --colors --port 5001 --content-base build/public",
    "build": "node_modules/.bin/webpack --config conf/webpack.config.js --progress --profile --colors"
  },
  "dependencies": {
    "amazeui": "^2.4.2",
    "babel-core": "^5.4.7",
    "babel-loader": "^5.1.3",
    "coffee-loader": "^0.7.2",
    "coffee-script": "^1.9.3",
    "css-loader": "^0.15.6",
    "echarts": "^2.2.7-beta7",
    "extract-text-webpack-plugin": "^0.8.1",
    "file-loader": "^0.8.4",
    "html-loader": "^0.3.0",
    "jquery": "^2.1.4",
    "manifest-revision-webpack-plugin": "^0.0.5",
    "node-sass": "^3.2.0",
    "postcss-loader": "^0.5.1",
    "sass-loader": "^2.0.0",
    "style-loader": "^0.12.3",
    "superagent": "^1.3.0",
    "url-loader": "^0.5.6",
    "vinyl-named": "^1.1.0",
    "vue": "^0.12.10",
    "vue-loader": "^2.1.1",
    "vue-validator": "^1.4.0",
    "webpack": "^1.10.0",
    "webpack-dev-server": "^1.9.0",
    "zrender": "ecomfe/zrender"
  }
}

我是在win8 64bit上面操作,本来安装的nodejs是64位的,
npm install时一直出现错误,上网查后有说要安装32位的,而且需要安装vs,
于是我卸载64的node又安装32的node,又安装vs2012,
然后又npm install
出现如下异常:
 npm WARN optional dep failed, continuing [email protected]
\
> [email protected] postinstall E:\project2\shijuan\node_modules\node-sass\node_modules\sas
modules\spawn-sync
> node postinstall
\
> [email protected] install E:\project2\shijuan\node_modules\node-sass
> node scripts/install.js

Binary downloaded and installed at E:\project2\shijuan\node_modules\node-sass\vendor\win32-



> [email protected] postinstall E:\project2\shijuan\node_modules\node-sass
> node scripts/build.js

` E:\project2\shijuan\node_modules\node-sass\vendor\win32-ia32-14\binding.node ` exists.
 testing binary.
Binary is fine; exiting.
\


> [email protected] install E:\project2\shijuan\node_modules\webpack-dev-server\node_modules
> node-gyp rebuild

|
(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
> if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
e  rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  bufferutil.cc
     正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io\
util
  .expb 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io\n
  正在生成代码
  已完成代码的生成
  bufferutil.vcxproj -> E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
  se\\bufferutil.node
|


> [email protected] install E:\project2\shijuan\node_modules\webpack-dev-server\node_mod
f-8-validate
> node-gyp rebuild

/
(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
ate
> if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
e  rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  validation.cc
     正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io-
ild\
  Release\validation.lib 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_mo
tf
  -8-validate\build\Release\validation.exp
  正在生成代码
  已完成代码的生成
  validation.vcxproj -> E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
  lidate\build\Release\\validation.node

> [email protected] install E:\project2\shijuan\node_modules\webpack-dev-server\node_mod
> node-gyp rebuild


(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
> if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
e  rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  validation.cc
     正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io\
lida
  tion.lib 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.i
va
  lidation.exp
  正在生成代码
  已完成代码的生成
  validation.vcxproj -> E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
  elease\\validation.node

> [email protected] install E:\project2\shijuan\node_modules\webpack-dev-server\node_modules
util
> node-gyp rebuild


(venv) Think@RESEARCH E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\sock
> if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\
e  rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  bufferutil.cc
     正在创建库 E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\socket.io-
Rele
  ase\bufferutil.lib 和对象 E:\project2\shijuan\node_modules\webpack-dev-server\node_module
ru
  til\build\Release\bufferutil.exp
  正在生成代码
  已完成代码的生成
  bufferutil.vcxproj -> E:\project2\shijuan\node_modules\webpack-dev-server\node_modules\so
  il\build\Release\\bufferutil.node
[email protected] node_modules\vinyl-named
└── [email protected]

[email protected] node_modules\manifest-revision-webpack-plugin
└── [email protected] ([email protected])

[email protected] node_modules\coffee-script

[email protected] node_modules\superagent
├── [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], core-u
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected])

其实看上去也成功了很多,但是前面那几个异常怎么解决呢?谢谢各位
1 回复

不用关心,这仅仅是vs项目编译时的警告而已

回到顶部