Issues with node and npm #390

Closed
6twenty opened this Issue Jul 6, 2012 · 7 comments

Projects

None yet

2 participants

6twenty commented Jul 6, 2012

I'm having a couple of related issues with my app. I've recently updated the app from node 0.6.17 to 0.8.1, and updated express from 2.5.11 to 3.0.0beta5. Both of these versions are stated in my package.json file which has been linted to check for errors. The app pushes to Nodester successfully.

I've then run into some issues:

  1. Running nodester npm install or nodester npm install express installs express 2.5.11, not 3.0.0beta5, seemingly ignoring the version specified in my package.json file
  2. Running nodester npm install express@3 fails because the "@" gets URL encoded
  3. Running curl -X POST -u "6twenty:<password>" -d "appname=quickdraw&action=install&package=express@3" http://api.nodester.com/npm does work, but fails with the following:
{"status":"success","output":"stdout: \nstderr: npm ERR! error installing express@3.0.0beta5 Error: Unsupported\nnpm ERR! error installing express@3.0.0beta5
at checkEngine (/usr/lib/node_modules/npm/lib/install.js:493:14)\nnpm ERR! error installing express@3.0.0beta5
at Array.0 (/usr/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)\nnpm ERR! error installing express@3.0.0beta5
at LOOP (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:13)\nnpm ERR! error installing express@3.0.0beta5
at chain (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:4)\nnpm ERR! error installing express@3.0.0beta5
at installOne_ (/usr/lib/node_modules/npm/lib/install.js:470:3)\nnpm ERR! error installing express@3.0.0beta5
at installOne (/usr/lib/node_modules/npm/lib/install.js:411:3)\nnpm ERR! error installing express@3.0.0beta5
at /usr/lib/node_modules/npm/lib/install.js:347:9\nnpm ERR! error installing express@3.0.0beta5
at /usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:54:35\nnpm ERR! error installing express@3.0.0beta5
at Array.forEach (native)\nnpm ERR! error installing express@3.0.0beta5
at /usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:54:11\nnpm ERR! error rolling back express@3.0.0beta5 Error: ENOTEMPTY, Directory not empty '/node/app/6twenty/11279-219ae7a2c4f50d977303a138604e48ca_rw/node_modules/express'\nnpm ERR! Unsupported\nnpm ERR! Not compatible with your version of node/npm: connect@2.3.6\nnpm ERR! Required: {\"node\":\">= 0.5.0\"}\nnpm ERR! Actual:   {\"npm\":\"1.0.106\",\"node\":\"0.4.9\"}\nnpm ERR! \nnpm ERR! System Linux 2.6.35.14-106.53.amzn1.x86_64\nnpm ERR! command \"node\" \"/usr/bin/npm\" \"install\" \"express@3\"\nnpm ERR! cwd /node/app/6twenty/11279-219ae7a2c4f50d977303a138604e48ca_rw\nnpm ERR! node -v v0.4.9\nnpm ERR! npm -v 1.0.106\nnpm ERR! code ENOTSUP\nnpm ERR! \nnpm ERR! Additional logging details can be found in:\nnpm ERR!
/node/app/6twenty/11279-219ae7a2c4f50d977303a138604e48ca_rw/npm-debug.log\nnpm not ok\n"}

The bit in there that caught my eye is this:

Required: {\"node\":\">= 0.5.0\"}\nnpm ERR! Actual: {\"npm\":\"1.0.106\",\"node\":\"0.4.9\"}

Which indicates to me that it's trying to install express using node v0.4.9, even though my app's package.json file specifies 0.8.1. For reference, here's my package.json:

{
  "author": "Mike Fulcher",
  "name": "quickdraw",
  "description": "Draw quickly!",
  "version": "0.0.1",
  "private": true,
  "homepage": "http://quickdraw.nodester.com",
  "node": "0.8.1",
  "repository": {
    "url": "defaultapp"
  },
  "main": "server.js",
  "dependencies": {
    "express": "3.x",
    "underscore": "*",
    "randomstring": "*"
  },
  "devDependencies": {},
  "optionalDependencies": {},
  "engines": {
    "node": "*"
  },
  "scripts": {
    "start": "node server"
  }
}
Collaborator

Indeed that's the problem. Let me run some test and I'll try to solve this.

Collaborator

Update your cli ([sudo] npm install -g https://github.com/nodester/nodester-cli/tarball/master, because it is not published still) and try again. We've fixed this.

@alejandro alejandro closed this Jul 12, 2012
6twenty commented Jul 12, 2012

Awesome -- you rock. Thanks!

Regarding point 1 from my original message: this is still happening under the latest nodester CLI. I currently have "express": "3.0.0beta4" in my package.json dependencies, but nodester npm install still chooses to install version 2.5.11.

Collaborator

Really? Wow. What about when you run: nodester npm install express@3.0.0beta5? This is my output:

⢷⡾  /~  ➔nodester npm list nowjs                                                                                                               »»»[09:38:11]
nodester info list npm packages for app: nowjs
nodester ├─┬ express@3.0.0beta5 
nodester │ ├── commander@0.6.1 
nodester │ ├─┬ connect@2.3.6 
nodester │ │ ├── bytes@0.0.1 
nodester │ │ ├── cookie@0.0.4 
nodester │ │ ├── formidable@1.0.11 
nodester │ │ ├── fresh@0.0.1 
nodester │ │ ├── mime@1.2.4 
nodester │ │ └── qs@0.4.2 
nodester │ ├── cookie@0.0.3 
nodester │ ├── crc@0.2.0 
nodester │ ├── debug@0.7.0 
nodester │ ├── fresh@0.1.0 
nodester │ ├── methods@0.0.1 
nodester │ ├── mkdirp@0.3.3 
nodester │ └── range-parser@0.0.4 
nodester ├─┬ now@0.8.1 
nodester │ ├── node-proxy@0.6.0 
nodester │ └─┬ socket.io@0.9.6 
nodester │   ├── policyfile@0.0.4 
nodester │   ├── redis@0.6.7 
nodester │   └─┬ socket.io-client@0.9.6 
nodester │     ├─┬ active-x-obfuscator@0.0.1 
nodester │     │ └── zeparser@0.0.5 
nodester │     ├── uglify-js@1.2.5 
nodester │     ├─┬ ws@0.4.20 
nodester │     │ ├── commander@0.6.1 
nodester │     │ ├── options@0.0.3 
nodester │     │ └── tinycolor@0.0.1 
nodester │     └── xmlhttprequest@1.2.2 
nodester └─┬ stylus@0.28.1 
nodester   ├── UNMET DEPENDENCY cssom 0.2.x
nodester   ├── UNMET DEPENDENCY debug *
nodester   └── UNMET DEPENDENCY mkdirp 0.3.x
nodester npm WARN cssom 0.2.x Unmet dependency in /node/app/alejandromg/11501-e5381aace610f9d2d82861e5c00e978b_rw/node_modules/stylus
nodester npm WARN debug * Unmet dependency in /node/app/alejandromg/11501-e5381aace610f9d2d82861e5c00e978b_rw/node_modules/stylus
nodester npm WARN mkdirp 0.3.x Unmet dependency in /node/app/alejandromg/11501-e5381aace610f9d2d82861e5c00e978b_rw/node_modules/stylus

6twenty commented Jul 13, 2012

Yeah, specifying "express@3" or "express@3.0.0beta5" both work perfectly, so it's just the nodester npm install command that doesn't seem to be picking up the correct version from the package.json file. My dependencies are currently listed as:

"dependencies": {
    "express": "3.0.0beta5",
    "underscore": "*",
    "randomstring": "*"
  }
@alejandro alejandro added a commit to nodester/nodester-cli that referenced this issue Jul 13, 2012
@alejandro alejandro Fix for nodester/nodester#390 b4173de
Collaborator

Done :).

btw i think that 3.0.0beta5 is not ready yet (https://new.npmjs.org/package/express/3.0.0beta5)

6twenty commented Jul 16, 2012

Just tested and it works perfectly. Awesome! And thanks for the heads up re express beta5 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment