cnpm / npminstall Goto Github PK
View Code? Open in Web Editor NEWMake `npm install` fast and easy.
License: Other
Make `npm install` fast and easy.
License: Other
master 分支:http://github.com/ant-design/ant-design
操作:tnpm install
[[email protected]] scripts.postinstall success, use 72ms
[[email protected]] scripts.prepublish: "antd-tools run guard"
antd-tools run guard
/Users/afc163/Projects/ant-design/node_modules/.0.3.7@orchestrator/index.js:153
throw err;
^
1
Error: Run "sh -c antd-tools run guard" error, exit code 1
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/tnpm/node_modules/runscript/index.js:67:21)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
npminstall version: 2.2.1
npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/tnpm/node_modules/npminstall/bin/install.js --tmp=/Users/afc163/.tnpm_tmp --progress=false --no-proxy --disturl=https://x/dist/node --userconfig=/Users/afc163/.tnpmrc --registry=http://registry.npm.x.com -d --china --prefix=/usr/local --forbidden-licenses=AGPL,CPAL,OSL --custom-china-mirror-url=https://x/dist
$ tnpm -v
[email protected] (/usr/local/lib/node_modules/tnpm/bin/tnpm.js)
[email protected] (/usr/local/lib/node_modules/tnpm/node_modules/npm/lib/npm.js)
[email protected] (/usr/local/bin/node)
[email protected] (/usr/local/lib/node_modules/tnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local (load prefix from: $ npm config get prefix)
darwin x64 15.5.0
registry=http://registry.npm.x.com
standard require eslint plugin, and eslint is deped by standard.
app/
- node_modules/standard -> .npminstall/standard/x.x.x
- node_modules/standard/node_modules/eslint -> ../../.npminstall/eslint/x.x.x
- node_modules/standard/node_modules/eslint-config-standard -> ../../.npminstall/eslint-config-standard/x.x.x
eslint will require('eslint-config-standard')
, because using link, eslint
can't require eslint-config-standard
.
eslint require('eslint-config-standard')
will try files:
app/node_modules/.npminstall/eslint/x.x.x/node_modules/eslint-config-standard
app/node_modules/.npminstall/node_modules/eslint-config-standard
app/node_modules/eslint-config-standard
These 3 paths will not exists in npminstall
link mode.
Like http://r.cnpmjs.org/antd/0.9.x antd deps
dependencies: {
"rc-menu": "~4.6.0",
"rc-select": "~4.9.0",
}
and rc-select@~4.9.0
deps
dependencies: {
"rc-menu": "4.x"
}
We should work like npm, use rc-menu@~4.6.0
for rc-select's "rc-menu": "4.x"
antd/node_modules/rc-menu/4.6.0
antd/node_modules/rc-select/4.9.0/node_modules/rc-menu/4.6.0
Just like npm does.
182.201.187.173 - 100.97.90.145 [31/Mar/2016:15:41:36 +0800] "GET /cross-spawn-async HTTP/1.0" 304 0 "install generator-react-fullstack" "npm/3.3.12 node/v5.4.0 win32 ia32" 0.028 0.027
When node_modules exists and node_modules/.npminstall not exists.
I wanted to see if V1.1.0 fixed this issue : #30
Hint : I tried that command at work and there's a proxy.
I think I might have to set strict-ssl=false
, is that possible ?
在 npmjs.com 的文档中:
prepublish: Run BEFORE the package is published. (Also run on local npm install without any arguments.)
在 npminstall 里, 已经过滤掉了 install <pkg>
的情形, 但对于 --production
模式, 也是需要过滤的, 请参见 npm 的讨论: npm/npm#3059 (comment)
$ git clone [email protected]:ant-design/ant-design.git
$ cd ant-design
$ tnpm ii
& tnpm start
Then visit http://127.0.0.1:8001
ERROR in ./site/component/utils.js
Module not found: Error: Cannot resolve module 'highlight.js' in /Users/afc163/Projects/ant-design/site/component
@ ./site/component/utils.js 19:17-40
such as follow structure
a
- node_modules
- b
In b
directory, I run npm install connect
which will install connect
into a/node_modules
, But npminstall install connect
will install connect
into a/b/node_modules
Maybe it will slow as npm3 does.
I had read this issue #33
but it didn't work
I simply read the source code but didn't find any lines about proxy.
Help us to location bug like MoOx/reduce-css-calc#13
Hi
Your repository is great :) , i met one problèm about the timeout random during the npminstall which change everytime. Not on the same dependancies . Also i ask me why you d ont do a PR at ied repository ? Maybe some contributors can help you to increase the features and fix some bugs :). This repository has a really potential ')
https://docs.npmjs.com/cli/install
-g, --global
)--production
modenpm install file:eslint-rule
)npm install ./rule.tgz
)npm install https://github.com/indexzero/forever/tarball/v0.5.6
)npm install git://github.com/timaschew/cogent#fix-redirects
)save
, save-dev
, save-optional
I didin't see a simple way to delete a module like npm => 'npm uninstall sass' for example
"_from": "[email protected]",
"_resolved": "https://registry.npm.taobao.org/copy-to/download/copy-to-2.0.1.tgz",
- Introduce a new prepare lifecycle event, which has the current behavior of the prepublish event – it runs before the package tarball is packed and uploaded to the registry during the publishing process, as well as when you run npm install (with no package name) after cloning a package, to prepare it for use (i.e. by transpiling source).
- Introduce a new prepublishOnly lifecycle event, which runs only at prepublish time.
Hi,
first of all thank for all your work it's a really nice project !
I'm wondering why I need to install twice sometimes, it's like npminstall do not see some packages at first run.
For example, if I clone one of my repo : https://github.com/maxime1992/web-template
Then inside it I run npminstall
and run npm run dev
it says "recess" is not installed. I run again npminstall
and it works. I start from a fresh install and then it says it cannot find a sass module.
I also have some errors with phantomJS :
If I'm missing anything I would be glad to know.
Cheers :)
git clone -b commit-hash
fails on some repository
tnpm ii [email protected] 装的是 2.4.1 这个版本。
装完后,我更新组件 用的命令是 tnpm ii react-router@^2.4.0
理论上,装的应该是[email protected] 这个版本, 但实际上装的还是2.4.1
如果我把node_modules 删掉,重新用tnpm ii react-router@^2.4.0 安装,这样就能正常安装到2.5.2 这个版本了。
使用:
tnpm ii react-router
tnpm ii [email protected]
源上有满足条件的新版本,但本地文件未更新。
https://github.com/mafintosh/prebuild/blob/master/util.js#L37
Take leveldown for example:
leveldown's package.json
"scripts": {
"install": "prebuild --install",
"test": "mocha --expose-gc --slow 2000 --timeout 600000"
},
$ npminstall -c
/path/to/prebuild-mirror-config.json
example:
{
"leveldown": {
"binary": {
"host": "https://npm.taobao.org/mirrors/leveldown"
}
},
"couchbase": {
"binary": {
"host": "https://npm.taobao.org/mirrors/couchbase"
}
},
...
}
For example
cnpm i --save expressjs/express#0774548736a00ab380dd648d98ef1a8b415356c5
It will make package.json
look like this.
{
"dependencies": {
"": "^undefined"
}
}
see https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a
git clone ssh://[user@]host.xz[:port]/path/to/repo.git/
git clone [user@]host.xz:path/to/repo.git/
https://docs.npmjs.com/files/package.json#git-urls-as-dependencies
npm 支持使用上述这两种
"module1": "git+ssh://[user@]host.xz[:port]/path/to/repo.git/",
"module2": "git+ssh://[user@]host.xz:path/to/repo.git/"
gitlab url 为 [email protected]:user/project.git
package.json 为
{ dependencies: { "module": "git+ssh://[email protected]:user/project.git" } }
sh -c git clone ssh://[email protected]:user/project.git
其实应该运行的命令是 sh -c git clone [email protected]:user/project.git
:
分割的路径, 改为 [email protected]:user/project.git
-> [email protected]/user/project.git
即可:
分隔比较常用, 所以来报个bugI install dtrace-proivde
, error occur cause by no npm_execpath
in install
script runtime.
origin npm
would add npm_execpath
in runtime env, but npminstall
not.
Sample package.json:
{
"name": "test_hash",
"dependencies": {
"grunt-cli": "gruntjs/grunt-cli#121f282"
}
}
like yarn
Packages are updated within one week.
esprima-fb@* installed at node_modules/.15001.1001.0-dev-harmony-fb@esprima-fb
All packages installed (1 packages installed from npm registry, use 299ms, speed 15.42kB/s, json 1(4.61kB), tarball 0B)
Recently updated packages:
today:
- npminstall > node-gyp > npmlog > gauge > [email protected] (16:32)
- [email protected] (22:01)
10-14:
- [email protected] (19:00)
- ...
It seems yarn has many similar design of npminstall...
I think i met some troubles with the dependancies and it's random, even after the upgrade in 1.0.8.
If you try npminstall
with this repository => https://github.com/kevincaradant/web-template
and then you try to build with the command npm run prod
. Libraries are missing randomly. Sometimes, it's imagemin-pngquant, or 'recess'.
Sometimes that work the first time and sometimes not :/. Did you have any idea why ?
Thank you
And this module is in the package.json.
When install scoped packages (such a typescript typings packages: @type/whatwg-fetch
, ...), it throws error:
Error: GET https://registry.npmjs.com/@types%2Fwhatwg-fetch/0.0.31 response 401 status, ERROR: you cannot fetch versions for scoped packages
at get (/Users/yanghanxing/.nvm/versions/node/v5.0.0/lib/node_modules/npminstall/lib/get.js:43:17)
at next (native)
at onFulfilled (/Users/yanghanxing/.nvm/versions/node/v5.0.0/lib/node_modules/npminstall/node_modules/co/index.js:65:19)
at process._tickCallback (node.js:377:9)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.