Skip to main content

Questions tagged [npm]

npm is the package manager shipped with Node.js. It can be used to install and publish CommonJS and ECMAScript modules, jQuery plugins, reusable JavaScript code (libraries), JavaScript-based CLI programs, and more.

10 votes
1 answer
1k views

Use an alternate dependency list for Node.JS + NPM

Is it possible to have two package.json files for a single NodeJS project? In a project I'm working on, there is an optional and experimental feature which requires some node packages of its own. For ...
nickf's user avatar
  • 543k
3 votes
2 answers
514 views

How to serve node_module files to the client

I'm trying to figure out of if there is a feature or convention I'm missing for referencing a js file from a node_module in the client html via script. For example, I have underscore installed via npm ...
Arne Claassen's user avatar
1 vote
2 answers
2k views

node.js socket.io client and server

I want to run the simplest demo of socket.io from http://socket.io The server (app.js) seems to work fine. But I have trouble with the client: <script src="/socket.io/socket.io.js"><...
astropanic's user avatar
  • 10.9k
5 votes
2 answers
7k views

Permission issues installing npm on OSX

I'm having issues installing the node package manager "npm". On the website it prompts you to do a 1 line install as follows... curl http://npmjs.org/install.sh | sh This spits out the following ...
Jon's user avatar
  • 3,955
316 votes
4 answers
568k views

How do I install package.json dependencies in the current directory using npm

I have a web app: fooapp. I have a package.json in the root. I want to install all the dependencies in a specific node_modules directory. How do I do this? What I want Lets say I have two widget ...
Daniel Beardsley's user avatar
3 votes
2 answers
1k views

How do you define an npm dependency nested in a git repo?

If I have an npm dependency that is nested in a git repo, how would I define that dependency in the package.json file? Say the git repo is at git://github.com/user/myrepo.git on the dev branch, at ...
Andrew Young's user avatar
  • 1,779
2 votes
1 answer
624 views

Node.js - NPM packages versioning

I recently published a package using NPM. I would like to know how NPM manages versioning. When does NPM create a new version of a package? Every time I update my NPM package.json file? Also, what ...
jeffreyveon's user avatar
  • 13.8k
1 vote
0 answers
606 views

Install Socket.io library

I have a problem installing the Socket.io library My server: SULinux release 2.0 ( kernel 2.6.18-194.el5PAE ) nodeJS version is v0.4.5 NPM version is 1.0.106 I tried to install socket.io using ...
Jindong  Jung's user avatar
1 vote
1 answer
975 views

Cannot require local modules in node

See this (javascript is the dir I am in): ➜ javascript mkdir tmp ➜ javascript cd tmp ➜ tmp mkdir node_modules ➜ tmp node --version v0.6.3 ➜ tmp npm --version 1.1.0-alpha-2 ➜ tmp npm ...
Jan's user avatar
  • 6,770
4 votes
2 answers
10k views

How to install npm for node.js installed with homebrew installed at custom path? [closed]

I'm using Mac OS X Lion 10.7, and installed homebrew with alternate install at custom path to keep it user scope requiring no sudo. I installed node.js successfully. But npm is not being installed. ...
eonil's user avatar
  • 85.2k
2 votes
1 answer
1k views

Should I reinstall npm each time after I upgraded Nodejs?

It seems each time I upgraded nodejs to a new version (>0.5.6?), npm is somewhat broken (you can still use the modules already installed but you cannot update or install new modules) This problem ...
number5's user avatar
  • 16.2k
1 vote
1 answer
2k views

nowjs/node-proxy fails to install on ubuntu 11.10

I'm trying to install now.js on ubuntu 11.10 (running on windows with wubi, if that matters). I've downloaded and installed node, npm, and socket.io just fine, but sudo npm install now fails for some ...
Noah Gilmore's user avatar
  • 1,369
1 vote
0 answers
688 views

Node.js/NPM and Juggernaut Install on Windows 7

I've edited my original question after discovering perhaps the root of my problem (Juggernaut is not working in my Rails app, regardless of the Juggernaut gem and Redis-server working OK): After ...
Derek's user avatar
  • 9,863
32 votes
7 answers
62k views

Use Git dependencies with npm and Node on Heroku

I have this package.json file: { "name": "application-name" , "version": "0.0.1" , "private": true , "dependencies": { "coffee-script": "1.1.3" , "express": "2.5.0" , "less": "...
Julien's user avatar
  • 9,216
0 votes
1 answer
169 views

Heroku - Find Node.js extension version intalled

I have a node.js running on heroku. I'm using some dependecies for node.js and I needed to know which version of pg node.js extension npm has installed. My package.json file looks like this: { "...
jribeiro's user avatar
  • 3,423

15 30 50 per page