$ npm install -g supervisor ... $ npm install supervisor -g ...
回复 (3)
D
刚才看了一下 npm install 命令原文件:npm-install.md
npm-install(3) -- install a package programmatically
SYNOPSIS
npm.commands.install([where,] packages, callback)
DESCRIPTION
This acts much the same ways as installing on the command-line.
The 'where' parameter is optional and only used internally, and it specifies where the packages should be installed to.
The 'packages' parameter is an array of strings. Each element in the array is the name of a package to be installed.
Finally, 'callback' is a function that will be called when all packages have been installed or when an error has been encountered.
发现 packages 为一包名,而且npm 命令直接用就行了,并不需要加 $npm 。所以就没按照node.js开发指南书上说的来了。试了一下命令:npm install a
结果出乎意料,没想到随便给个a还有内容下来了。。
C:\Users\danger>npm install a npm http GET https://registry.npmjs.org/a npm http 200 https://registry.npmjs.org/a npm http GET https://registry.npmjs.org/a/-/a-0.3.7.tgz npm http 200 https://registry.npmjs.org/a/-/a-0.3.7.tgz npm http GET https://registry.npmjs.org/a_mock/0.0.7 npm http GET https://registry.npmjs.org/a_test/0.1.0 npm http 200 https://registry.npmjs.org/a_mock/0.0.7 npm http 200 https://registry.npmjs.org/a_test/0.1.0 npm http GET https://registry.npmjs.org/a_mock/-/a_mock-0.0.7.tgz npm http GET https://registry.npmjs.org/a_test/-/a_test-0.1.0.tgz npm http 200 https://registry.npmjs.org/a_mock/-/a_mock-0.0.7.tgz npm http 200 https://registry.npmjs.org/a_test/-/a_test-0.1.0.tgz [email protected] node_modules\a ├── [email protected] └── [email protected]
D
D
我用这个命令安装其他包也是一样的省略号就什么都没有了,这种是 npm 没安装吗?
参与回复
登录后即可参与回复。登录