[TIMOB-13178] CLI: Alpha package will not install with node v0.8.17 and npm v1.2.0 configuration
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2013-03-31T13:26:42.000+0000 |
| Affected Version/s | Release 3.1.0 |
| Fix Version/s | 2013 Sprint 07 JS, 2013 Sprint 07 |
| Components | CLI |
| Labels | qe-sdk3.1.0 |
| Reporter | Eric Merriman |
| Assignee | Christian Sullivan |
| Created | 2013-03-23T20:21:37.000+0000 |
| Updated | 2017-03-22T17:26:33.000+0000 |
Description
Error
When attempting to install the npm package for the CLI "sudo npm install -g titanium@3.0.25-alpha", I would get two lines, then the install seemed to hang:
npm http GET https://registry.npmjs.org/titanium/3.0.25-alpha
npm http 304 https://registry.npmjs.org/titanium/3.0.25-alpha
npm cache clean gave slightly better results:
npm http GET https://registry.npmjs.org/titanium/3.0.25-alpha
npm http 200 https://registry.npmjs.org/titanium/3.0.25-alpha
npm http GET https://registry.npmjs.org/titanium/-/titanium-3.0.25-alpha.tgz
npm http 200 https://registry.npmjs.org/titanium/-/titanium-3.0.25-alpha.tgz
But the CLI was not installed. We found this:
https://github.com/isaacs/npm/issues/3058
Other QE team members data: working as expected: node: v0.8.16 npm: 1.1.69 also: node: v0.8.3 npm: 1.1.43 also: node: v0.10.0 npm: 1.2.14 also: node: v0.8.17 npm: 1.2.15 The only configs that did not work included npm 1.2.0.
We should see if there is a way _not_ to force the user to update NPM.
The workaround was successful:
The problem is there is a bug in npm where it tries to install .gitignore as a package and is unable to resolve its package.json. See below verbose output for example full install log included also.
The way we would resolve this issue is by republishing thetitaniumnode package with out the .gitignore➜ titanium-master npm install -g titanium@3.0.25-alpha -dd npm info it worked if it ends with ok npm verb cli [ '/usr/local/bin/node', npm verb cli '/usr/local/bin/npm', npm verb cli 'install', npm verb cli '-g', npm verb cli 'titanium@3.0.25-alpha', npm verb cli '-dd' ] npm info using npm@1.2.0 npm info using node@v0.8.17 npm verb read json /usr/local/lib/package.json npm verb read json /usr/local/lib/package.json npm verb cache add [ 'titanium@3.0.25-alpha', null ] npm verb parsed url { pathname: 'titanium@3.0.25-alpha', npm verb parsed url path: 'titanium@3.0.25-alpha', npm verb parsed url href: 'titanium@3.0.25-alpha' } npm verb parsed url { pathname: '3.0.25-alpha', npm verb parsed url path: '3.0.25-alpha', npm verb parsed url href: '3.0.25-alpha' } npm verb addNamed [ 'titanium', '3.0.25-alpha' ] npm verb addNamed [ '3.0.25-alpha', '3.0.25-alpha' ] npm verb lock titanium@3.0.25-alpha /Users/euforic/.npm/94ba33e8-titanium-3-0-25-alpha.lock info trying registry request attempt 1 at 02:23:04 http GET https://registry.npmjs.org/titanium/3.0.25-alpha http 304 https://registry.npmjs.org/titanium/3.0.25-alpha npm verb read json /Users/euforic/.npm/titanium/3.0.25-alpha/package/package.json npm info install titanium@3.0.25-alpha into /usr/local/lib npm info installOne titanium@3.0.25-alpha npm verb from cache /Users/euforic/.npm/titanium/3.0.25-alpha/package/package.json npm info /usr/local/lib/node_modules/titanium unbuild npm verb read json /usr/local/lib/node_modules/titanium/package.json npm verb tar unpack /Users/euforic/.npm/titanium/3.0.25-alpha/package.tgz npm verb lock /usr/local/lib/node_modules/titanium /Users/euforic/.npm/b1e37a7e--local-lib-node-modules-titanium.lock npm verb read json /usr/local/lib/node_modules/titanium/package.json npm info preinstall titanium@3.0.25-alpha npm verb from cache /usr/local/lib/node_modules/titanium/package.json npm verb readDependencies using package.json deps npm verb from cache /usr/local/lib/node_modules/titanium/package.json npm verb readDependencies using package.json deps npm verb read json /usr/local/lib/node_modules/titanium/node_modules/node_modules/package.json npm verb read json /usr/local/lib/node_modules/titanium/node_modules/package.json/package.json npm verb read json /usr/local/lib/node_modules/titanium/node_modules/README.md/package.jsonOne way we can avoid supporting many version of node.js and npm would be to just include the node binary and npm either in the cli tool or in a directory where the specific version can be accessed. We can also add ./bin to the users $PATHS allowing any usage of node or npm from within the folder to use the
bins node and npm version. example Install node version 0.8.15Should output node v0.8.15 and npm v1.1.66$ (cd ~/.titanium && \ curl -L# http://nodejs.org/dist/v0.8.15/node-v0.8.15-darwin-x86.tar.gz \ | tar -zx --strip 1) \ && ./bin/npm install -g alloyShould output system installed version of node and npmWe're not going to ship node with the NM package for now. For the average user, we are asking them to update to Node 0.8.22 which includes a newer version of NPM. Or they can upgrade NPM manually as noted in the workaround above.
Closing ticket as the issue will not fix and with reference to the above comments.