npm安装多个软件包名称 [英] npm install multiple package names
本文介绍了npm安装多个软件包名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
npm install --save-dev package1 package2
绝对不是安装多个软件包,但它看起来很重要。 (例如 https://www.browsersync.io/docs/gulp )
对于我来说,它会抛出以下错误:
C:\ 1HLAVNI\Lukas\Webdesign\lukasradek> npm install --save-dev gulp-babel gulp-add-src> bufferutil@1.1.0安装C:\ 1HLAVNI\Lukas\Webdesign\lukasradek\\\
ode_modules\bufferutil> node-gyp rebuildC:\ 1HLAVNI\Lukas\Webdesign\lukasradek\\\
ode_modules\bufferutil>如果未定义npm_config_node_gyp(节点C:\程序文件\节点\节点模块\\\\\\\\\\\\ \\ node-gyp-bin \\\\\\\ node_modules\\\
ode-gyp\bin\\\
ode-gyp.jsrebuild)else(noderebuild)gyp ERR!配置errorgyp ERR!堆栈错误:找不到Python可执行文件python,你可以设置PYTHON env variable.gyp ERR!堆栈在failNoPython(C:\程序文件\ nodejs\\\
ode_modules\\\
pm\\\
ode_modules\\\
ode-gyp\lib\configure.js:401:14)gyp ERR!堆栈在C:\程序文件\ nodejs\\\
ode_modules\\\
pm\\\
ode_modules\\\
ode-gyp\lib\configure.js:356:11gyp ERR!堆栈在FSReqWrap.oncomplete(fs.js:123:15)gyp ERR!系统Windows_NT 10.0.10586gyp ERR!命令C:\\Program Files\\\\
odejs\\\\
ode.exeC:\\Program Files\\\\
odejs\\\\
ode_modules\\\\
pm\\\ \\ node_modules \\ node-gyp \\\\\\\\\ node-gyp.jsrebuildgyp ERR! cwd C:\ 1HLAVNI\Lukas\Webdesign\lukasradek\\\
ode_modules\bufferutilgyp ERR! node -v v6.3.1gyp ERR! node-gyp -v v3.3.1gyp ERR! not oknpm WARN install:bufferutil@1.1.0 bufferutil@1.1.0 install:`node-gyp rebuild`npm WARN install:bufferutil@1.1.0退出状态1> utf-8-validate@1.1.0安装C:\ 1HLAVNI\Lukas\Webdesign\lukasradek\\\
ode_modules\utf-8-validate> node-gyp rebuildC:\ 1HLAVNI\Lukas\Webdesign\lukasradek\\\
ode_modules\utf-8-validate>如果没有定义npm_config_node_gyp(节点C:\ Program Files \\\
odejs\\\
ode_modules\\\
pm \ bin\\\
ode-gyp-bin\\\\\\
ode_modules\\\
ode-gyp\bin\\\
ode-gyp.jsrebuild)else(noderebuild)gyp ERR !配置errorgyp ERR!堆栈错误:找不到Python可执行文件python,你可以设置PYTHON env variable.gyp ERR!堆栈在failNoPython(C:\程序文件\ nodejs\\\
ode_modules\\\
pm\\\
ode_modules\\\
ode-gyp\lib\configure.js:401:14)gyp ERR!堆栈在C:\程序文件\ nodejs\\\
ode_modules\\\
pm\\\
ode_modules\\\
ode-gyp\lib\configure.js:356:11gyp ERR!堆栈在FSReqWrap.oncomplete(fs.js:123:15)gyp ERR!系统Windows_NT 10.0.10586gyp ERR!命令C:\\Program Files\\\\
odejs\\\\
ode.exeC:\\Program Files\\\\
odejs\\\\
ode_modules\\\\
pm\\\ \\ node_modules \\ node-gyp \\\\\\\\\ node-gyp.jsrebuildgyp ERR! cwd C:\ 1HLAVNI\Lukas\Webdesign\lukasradek\\\
ode_modules\utf-8-validategyp ERR! node -v v6.3.1gyp ERR! node-gyp -v v3.3.1gyp ERR! not oknpm WARN安装:utf-8-validate@1.1.0 utf-8-validate@1.1.0安装:`node-gyp rebuild`npm WARN安装:utf-8-validate@1.1.0退出状态1lukasradek@1.0。 0 C:\ 1HLAVNI\Lukas\Webdesign\lukasradek + - gulp-add-src@0.2.0 | + - event-stream@3.1.7 | | ` - split@0.2.10 | + - streamqueue@0.1.3 | | ` - readable-stream@1.0.34 | `--through2@0.4.2 | + - readable-stream@1.0.34 | ` - xtend@2.1.2 | ` - object-keys@0.4.0`-- gulp-babel@6.1.2 + - babel-core@6.13.2 | + - babel-code-frame@6.11.0 | | ` - js-tokens@2.0.0 | + - babel-generator@6.11.4 | | + - detect-indent@3.0.1 | | | ` - repeating@1.1.3 | | ` - lodash@4.14.1 | + - babel-helpers@6.8.0 | + - babel-messages@6.8.0 | + - babel-register@6.11.6 | | + - core-js@2.4.1 | | + - home-or-tmp@1.0.0 | | + - lodash@4.14.1 | | + - path-exists@1.0.0 | | ` - source-map-support@0.2.10 | | ` - source-map@0.1.32 | + - babel-runtime@6.11.6 | | ` - regenerator-runtime@0.9.5 | + - babel-template@6.9.0 | | ` - lodash@4.14.1 | + - babel-traverse@6.13.0 | | + - globals@8.18.0 | | + - invariant@2.2.1 | | | ` - loose-envify@1.2.0 | | | ` - js-tokens@1.0.3 | | ` - lodash@4.14.1 | + - babel-types@6.13.0 | | + - lodash@4.14.1 | | ` - tofast-properties@1.0.2 | + - babylon@6.8.4 | + - json5@0.4.0 | + - lodash@4.14.1 | + - minimatch@3.0.2 | + - path-exists@1.0.0 | + - private@0.1.6 | + - shebang-regex@1.0.0 | ` - slash@1.0.0` - object-assign@4.1.0npm WARN可选跳过失败的可选依赖项/ chokidar / fsevents:npm WARN notsup与您的操作系统或体系结构不兼容:fsevents@1.0.14npm WARN lukasradek@1.0 .0 No repository field。
npm i -S package1 package2
code>
另存为dev-dependencies:
npm i -D package1 package2
What does it do when I run this command:
npm install --save-dev package1 package2
It is definitely not installing multiple packages, but it looks to be essential. (For example https://www.browsersync.io/docs/gulp)
For me it throws following ERRs:
C:\1HLAVNI\Lukas\Webdesign\lukasradek>npm install --save-dev gulp-babel gulp-add-src
> bufferutil@1.1.0 install C:\1HLAVNI\Lukas\Webdesign\lukasradek\node_modules\bufferutil
> node-gyp rebuild
C:\1HLAVNI\Lukas\Webdesign\lukasradek\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\1HLAVNI\Lukas\Webdesign\lukasradek\node_modules\bufferutil
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:bufferutil@1.1.0 bufferutil@1.1.0 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.1.0 Exit status 1
> utf-8-validate@1.1.0 install C:\1HLAVNI\Lukas\Webdesign\lukasradek\node_modules\utf-8-validate
> node-gyp rebuild
C:\1HLAVNI\Lukas\Webdesign\lukasradek\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\1HLAVNI\Lukas\Webdesign\lukasradek\node_modules\utf-8-validate
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:utf-8-validate@1.1.0 utf-8-validate@1.1.0 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.1.0 Exit status 1
lukasradek@1.0.0 C:\1HLAVNI\Lukas\Webdesign\lukasradek
+-- gulp-add-src@0.2.0
| +-- event-stream@3.1.7
| | `-- split@0.2.10
| +-- streamqueue@0.1.3
| | `-- readable-stream@1.0.34
| `-- through2@0.4.2
| +-- readable-stream@1.0.34
| `-- xtend@2.1.2
| `-- object-keys@0.4.0
`-- gulp-babel@6.1.2
+-- babel-core@6.13.2
| +-- babel-code-frame@6.11.0
| | `-- js-tokens@2.0.0
| +-- babel-generator@6.11.4
| | +-- detect-indent@3.0.1
| | | `-- repeating@1.1.3
| | `-- lodash@4.14.1
| +-- babel-helpers@6.8.0
| +-- babel-messages@6.8.0
| +-- babel-register@6.11.6
| | +-- core-js@2.4.1
| | +-- home-or-tmp@1.0.0
| | +-- lodash@4.14.1
| | +-- path-exists@1.0.0
| | `-- source-map-support@0.2.10
| | `-- source-map@0.1.32
| +-- babel-runtime@6.11.6
| | `-- regenerator-runtime@0.9.5
| +-- babel-template@6.9.0
| | `-- lodash@4.14.1
| +-- babel-traverse@6.13.0
| | +-- globals@8.18.0
| | +-- invariant@2.2.1
| | | `-- loose-envify@1.2.0
| | | `-- js-tokens@1.0.3
| | `-- lodash@4.14.1
| +-- babel-types@6.13.0
| | +-- lodash@4.14.1
| | `-- to-fast-properties@1.0.2
| +-- babylon@6.8.4
| +-- json5@0.4.0
| +-- lodash@4.14.1
| +-- minimatch@3.0.2
| +-- path-exists@1.0.0
| +-- private@0.1.6
| +-- shebang-regex@1.0.0
| `-- slash@1.0.0
`-- object-assign@4.1.0
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN lukasradek@1.0.0 No repository field.
解决方案
Save as dependencies:
npm i -S package1 package2
Save as dev-dependencies:
npm i -D package1 package2
这篇关于npm安装多个软件包名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文