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.

npm is the package manager shipped with .

npm can be used to install and publish and ECMAScript modules as well as JavaScript-based CLI programs. See the npm homepage for more information.

npm has the ability to install packages to a local directory or globally with the -g flag. Global packages are generally CLI programs.

npm packages manage dependencies and pass information to npm through the file. It contains entries for package name, version, git, dependencies, and other information. The official documentation can be found here.

npm uses the system. This system promote three version stages as well as suffixes. For example, v1.2.3-alpha. npm supports modifiers such as asterisks and greater/less than signs when specifying dependencies. More information can be found here and here.

As of April 14, 2015 npm also supports private modules that can be defined and used only by users who you specify. More about private modules here.

npm comes bundled with the installation of NodeJS, so there is no need for a separate install.

To search for modules:

Documentation Links:

Useful links:

49337 questions
22
votes
6 answers

Error integrating ESLint with sublime

I am new to Node.js, npm and sublime environment and I am finding it difficult to integrate ESlint with sublime editor. The steps which I followed is as follows: Installed ESLint with command: npm install -g eslint Installed ESLint with Sublime…
user2692032
  • 771
  • 7
  • 26
22
votes
2 answers

Show most recently published versions of npm package, including beta versions

How can I show the most recently published versions of an npm package, including beta/unstable versions? This question helps identify how you can get the most recent, stable version (does not show beta version), but I would like to see a list of the…
Himmel
  • 3,629
  • 6
  • 40
  • 77
22
votes
3 answers

Creating different eslint rules for local development

Here's a motivating example: I am developing some code and want to figure out what's going wrong, so I have function foo() { console.log("Look its 2016 and I'm still printf debugging"); } Except... our build process runs esLint as part of the…
AnilRedshift
  • 7,937
  • 7
  • 35
  • 59
22
votes
5 answers

Error following angularjs2 Quickstart Guide error 404 'angular' is not in the npm registry

I recently cloned the official AngularJS Quickstart code and ran npm install. I received a 404. error 404 'angular' is not in the npm registry. Here is my npm debug log: 17 silly registry.get 'content-length': '40', 517 silly registry.get …
Aayush Aarwal
  • 684
  • 3
  • 9
  • 21
22
votes
5 answers

Unable to run babel via npm script "babel: command not found"

To get started I ran: npm install --save-dev babel-cli npm install --save-dev babel-preset-es2015 npm install --save-dev babel-preset-stage-0 Here is my package.json: { "scripts": { "build": "babel src -d dist" }, …
Justin
  • 2,265
  • 4
  • 15
  • 21
22
votes
2 answers

string templates are not supported by current javascript version

I am trying to use ES6 String Templates in a Node.js (v 5.7.0) app, but they are not working. Webstorm is correctly warning me that String templates are not supported by current Javascript version I am sure I have used string templates in a node…
cyrf
  • 5,127
  • 6
  • 25
  • 42
22
votes
1 answer

Development on Angular2 with TS but without NPM

All guides suggests to install npm, but I'm searching for a way without it. There are Angular2 files available, but none of them are TypeScript code. So what must I do? Do I need Angular2.ts or specific Angular2-xx.js and .d.ts files? UPDATE:…
Arman Hayots
  • 2,459
  • 6
  • 29
  • 53
22
votes
6 answers

How can I serve an AngularJS 2 app without having to also serve all the files in `node_modules`?

I am trying to run the Angular 2 seed application. Unfortunately npm install places a massive numbers of files into node_modules which I presume I also have to serve alongside the seed application code. I don't want to have to serve all these static…
Dan
  • 5,013
  • 5
  • 33
  • 59
22
votes
4 answers

Why does Ubuntu have old versions of nodejs and npm in their apt-get package manager?

When I install nodejs and npm with apt-get sudo apt-get update sudo apt-get install nodejs modejs-legacy npm I have the versions I get the following versions npm -v 1.3.10 nodejs -v v0.10.25 I know how to update these manually, but why does the…
user1283776
  • 19,640
  • 49
  • 136
  • 276
22
votes
11 answers

Can't install anything with npm ECONNRESET without proxy

I used node.js to install some things via npm without any problems. Now I changed nothing on my settings (Win8; no proxy, internet is working) and I can't install anything (especially cordova and ionic). It only throws errors like I'm behind a…
bastifix
  • 443
  • 1
  • 6
  • 18
22
votes
2 answers

Running npm behind a corporate firewall: what do I need to tell the security team?

I am trying to run node.js but cannot install any packages as npm is blocked. I have tried the solutions here: How to fill in proxy information in cntlm config file?, and here: NPM behind NTLM proxy and still received errors. I have tripled checked…
rlsaj
  • 735
  • 1
  • 12
  • 37
22
votes
7 answers

How to use a private npm registry on Elastic Beanstalk?

We have a nodejs project running on Amazon Elastic Beanstalk that uses private modules that we host using nodejitsu's private npm registry. However getting access to the private npm registry from the elastic instances hasn't been straightforward and…
22
votes
2 answers

How do get script content using cheerio

I am using the cheerio lib and am trying to get this script field - script type="application/json" But for some reason it can not find these script tags. What is wrong? How do I fix? var $ = require('cheerio') var parsedHTML =…
CWon
  • 261
  • 1
  • 2
  • 7
22
votes
5 answers

node . and npm start don't work

The title says most of the problem. When I try to run node . I get: module.js:340 throw err; ^ Error: Cannot find module 'static-favicon' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load…
Bren
  • 3,516
  • 11
  • 41
  • 73
22
votes
7 answers

'http-server' is not recognized as an internal or external command

After installing angular-seed project, i did the following steps: Cloned the repository : git clone https://github.com/angular/angular-seed.git cd angular-seed Then I ran npm install at the end of the install i get: angular-seed@0.0.0 prestart…
Liad Livnat
  • 7,435
  • 16
  • 60
  • 98