Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13178] CLI: Alpha package will not install with node v0.8.17 and npm v1.2.0 configuration

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2013-03-31T13:26:42.000+0000
Affected Version/sRelease 3.1.0
Fix Version/s2013 Sprint 07 JS, 2013 Sprint 07
ComponentsCLI
Labelsqe-sdk3.1.0
ReporterEric Merriman
AssigneeChristian Sullivan
Created2013-03-23T20:21:37.000+0000
Updated2017-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

Workaround:

Update npm version with: sudo npm install npm -g Then retry install.

Steps to reproduce:

1) Ensure you have the indicated versions of node and npm 2) try to install alpha version with "sudo npm install -g titanium@3.0.25-alpha"

Result:

The install fails with 2-4 lines then hang

Expected:

Install succeeds

Comments

  1. Eric Merriman 2013-03-23

    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.
  2. Ingo Muschenetz 2013-03-24

    We should see if there is a way _not_ to force the user to update NPM.
  3. Dustin Hyde 2013-03-26

    The workaround was successful:
       sudo npm install npm -g
       sudo npm install -g titanium@3.0.25-alpha
       
  4. Christian Sullivan 2013-03-27

    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.
       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.json
       
    The way we would resolve this issue is by republishing the titanium node 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.json
       
  5. Christian Sullivan 2013-03-28

    One 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.15
       $ (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 alloy
       
    Should output node v0.8.15 and npm v1.1.66
       $ cd ~/.titanium
       $ node -v
       $ npm -v
       
    Should output system installed version of node and npm
       $ cd ~/
       $ node -v
       $ npm -v
       
  6. Ingo Muschenetz 2013-03-31

    We'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.
  7. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source