tagged [npm]

NPM ERR Code E401: Unable to authenticate, need: Bearer authorization

NPM ERR Code E401: Unable to authenticate, need: Bearer authorization I downloaded a NodeJS application from GitHub and facing the following error when executing npm install. ``` npm ERR! code E401 np...

6 Jan at 06:17

What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?

What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file? [This documentation](https://docs.npmjs.com/files/package.json) answers my question very poor...

How come npm install doesn't work on git bash

How come npm install doesn't work on git bash I have git bash open and I type in `npm install` and then it returns: I don't understand, because I have `node.js` command prompt and when I type in `npm ...

10 Mar at 12:21

npm install ->Failed at the node-sass@4.5.0 postinstall script

npm install ->Failed at the node-sass@4.5.0 postinstall script I'm trying to do `npm install` and an error appears : I tried to delete `node_modules` and then reinstall it, same error appears. what wi...

ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.2.1 was found instead

ERROR in The Angular Compiler requires TypeScript >=3.1.1 and ERROR in The Angular Compiler requires TypeScript >=3.1.1 and

21 Dec at 19:53

Purpose of installing Twitter Bootstrap through npm?

Purpose of installing Twitter Bootstrap through npm? Question 1: What exactly is the purpose of installing Twitter Bootstrap through npm? I thought npm was meant for server side modules. Is it faster ...

Is there a way to get version from package.json in nodejs code?

Is there a way to get version from package.json in nodejs code? Is there a way to get the version set in `package.json` in a nodejs app? I would want something like this

How to set custom location for local installation of npm package?

How to set custom location for local installation of npm package? Is it possible to specify a custom package destination for `npm install`, either through a command flag or environment variable? By de...

5 Oct at 12:54

npx command not found

npx command not found I am working with webpack and I need to execute `./node_modules/webpack/bin/webpack.js` using `npx`. `npx webpack` would run the webpack binary (`./node_modules/webpack/bin/webpa...

27 Aug at 19:23

Why isn't Node Version Manager (NVM) recognized on Windows?

Why isn't Node Version Manager (NVM) recognized on Windows? I am trying to downgrade my version of node I ran: and I exported the bin folder to my Windows path variable, but I still get: > 'nvm' is no...

9 Mar at 09:13

You seem to not be depending on "@angular/core". This is an error

You seem to not be depending on "@angular/core". This is an error I want to create an angular 2 App with angular cli I have written in the cmd: > npm install angular-cli -g then: > ng firstngapp but i...

13 Jul at 12:55

What does npm install --legacy-peer-deps do exactly? When is it recommended / What's a potential use case?

What does npm install --legacy-peer-deps do exactly? When is it recommended / What's a potential use case? Just ran into this error: ``` npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve depe...

What's the difference between tilde(~) and caret(^) in package.json?

What's the difference between tilde(~) and caret(^) in package.json? After I upgraded to the latest stable `node` and `npm`, I tried `npm install moment --save`. It saves the entry in the `package.jso...

Message "the term 'ng' is not recognized as the name of a cmdlet"

Message "the term 'ng' is not recognized as the name of a cmdlet" Today, while working through some basic AngularJS introduction, I ran into a problem. I opened PowerShell to get going on the project....

Find unused npm packages in package.json

Find unused npm packages in package.json Is there a way to determine if you have packages in your `package.json` file that are no longer needed? For instance, when trying out a package and later comme...

20 Oct at 13:10

Can I execute npm commands directly from the visual studio

Can I execute npm commands directly from the visual studio Can I execute npm commands (e.g. npm init, npm install) directly from Visual Studio 2017 on Asp.Net Core 2.0 project? May be from command lin...

How to use private Github repo as npm dependency

How to use private Github repo as npm dependency How do I list a private Github repo as a `"dependency"` in `package.json`? I tried [npm's Github URLs](https://docs.npmjs.com/files/package.json#github...

25 Feb at 20:10

How to stop app that node.js express 'npm start'

How to stop app that node.js express 'npm start' You build node.js app with express v4.x then start your app by . My question is how to stop the app? Is there ? to include the error when implement ```...

25 Apr at 15:35

Is there any way to configure multiple registries in a single npmrc file

Is there any way to configure multiple registries in a single npmrc file Here is my problem. We have a private NPM registry which only works in VPN. I would like to have a fallback registry [https://r...

5 Jul at 08:30

How do I correctly upgrade angular 2 (npm) to the latest version?

How do I correctly upgrade angular 2 (npm) to the latest version? Recently I started Angular 2 tutorial at [https://angular.io/docs/ts/latest/tutorial/](https://angular.io/docs/ts/latest/tutorial/). a...

19 Sep at 06:3

How do I add comments to package.json for npm install?

How do I add comments to package.json for npm install? I've got a simple package.json file and I want to add a comment. Is there a way to do this, or are there any hacks to make this work? ``` { "nam...

7 Aug at 05:26

Install specific branch from github using Npm

Install specific branch from github using Npm I would like to install bootstrap-loader from github in my project using npm Currently they are maintaining two version of this project which are comaptib...

23 Aug at 21:43

How to fix npm vulnerabilities manually?

How to fix npm vulnerabilities manually? When I run `npm install` it says `found 33 vulnerabilities (2 low, 31 moderate) run `npm audit fix` to fix them, or `npm audit` for details`. However, `npm aud...

14 Jul at 03:11

Change default global installation directory for node.js modules in Windows?

Change default global installation directory for node.js modules in Windows? In my windows installation `PATH` includes `C:\Program Files\nodejs`, where executable `node.exe` is. I'm able to launch `n...

9 Nov at 09:49

Unable to resolve dependency tree error when installing npm packages

Unable to resolve dependency tree error when installing npm packages When trying to install the npm packages using `npm i` command, I am getting the following exception: [](https://i.stack.imgur.com/x...

11 Aug at 09:28

NPM warn message about deprecated package

NPM warn message about deprecated package I am installing a module globally and NPM says > "npm WARN deprecated lodash@1.0.2: lodash@

6 Feb at 02:41

ERROR in Cannot find module 'node-sass'

ERROR in Cannot find module 'node-sass' Config: macOS High Sierra, version 10.13.2, node:v8.1.2 npm:5.0.3 When I run npm start in my angularjs project I get this error: After this I run: Now I get thi...

SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 Since a few days I got an issue with Mac OS High Sierra 10.13.3 : When I run a `git clone` like `git clone github.com/xxx.git failed` it ...

19 Jan at 23:25

Node.js - SyntaxError: Unexpected token import

Node.js - SyntaxError: Unexpected token import I don't understand what is wrong. Node v5.6.0 NPM v3.10.6 The code: The error: ``` SyntaxError: Unexpected token import at exports.runInThisContext (vm...

15 Nov at 16:9

Is there a way to force npm to generate package-lock.json?

Is there a way to force npm to generate package-lock.json? I deleted it by accident and have made many changes to `package.json` since. An `npm install` or `npm update` do not generate `package-lock.j...

10 Jun at 18:41

nvm is not compatible with the npm config "prefix" option:

nvm is not compatible with the npm config "prefix" option: I am trying to run another NodeJS version with `nvm` but getting this error: ``` $ nvm use v4.2.4 nvm is not compatible with the npm config "...

11 Jan at 10:34

How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?

How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)? I have this in my package.json file (shortened version): I am using NPM version 1.1.1 on Mac 10.6.8. When I run ...

16 Apr at 04:16

Nodejs cannot find installed module on Windows

Nodejs cannot find installed module on Windows I am learning nodejs at the moment on Windows. Several modules are installed globally with npm.cmd, and nodejs failed to find the installed modules. Take...

25 Apr at 15:23

The command "npm run build -- --prod" exited with code 1 error

The command "npm run build -- --prod" exited with code 1 error I'm developing an Asp.Net Core 2 and Angular 5 project in visual studio 2017. When I'm going to publish my project then the error '' sho...

Installing Bower on Ubuntu

Installing Bower on Ubuntu I'm trying to install Bower on XUbuntu 13.10, following the instructions on the Bower home page, after doing `sudo apt-get install npm` and `sudo npm install -g bower` I get...

6 May at 06:40

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json' I just want to install socket.io to my project which is located on 3.chat folder. But when I run following comma...

Downgrade npm to an older version

Downgrade npm to an older version I tried updating `npm` to see if it would solve some dependency problems we were having, and now I want to downgrade to the version the rest of the development team i...

12 Aug at 14:9

When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)

When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0) I am getting this error while running `sudo npm install`. On my server, npm was installed earlier. I've tried to delete the...

31 Jan at 08:10

How to clean node_modules folder of packages that are not in package.json?

How to clean node_modules folder of packages that are not in package.json? Assume I install project packages with `npm install` that looks into `package.json` for modules to be installed. After a whil...

16 Jan at 15:39

npm ERR! network getaddrinfo ENOTFOUND

npm ERR! network getaddrinfo ENOTFOUND I am getting `npm ERR! network getaddrinfo ENOTFOUND` error while trying to install any package using NPM. I know there are numerous threads on the same issue bu...

21 Apr at 08:21

ExpressJS - throw er Unhandled error event

ExpressJS - throw er Unhandled error event I created expressjs application using the following commands: When I run the application with: `node app.js`, I have the following errors: ``` events.js:72 ...

30 May at 04:33

How to make the webpack dev server run on port 80 and on 0.0.0.0 to make it publicly accessible?

How to make the webpack dev server run on port 80 and on 0.0.0.0 to make it publicly accessible? I am new to the whole / world so apologies if my question sounds silly. So I am playing around with [re...

How to include scripts located inside the node_modules folder?

How to include scripts located inside the node_modules folder? I have a question concerning best practice for including `node_modules` into a HTML website. Imagine I have Bootstrap inside my `node_mod...

Running bash scripts with npm

Running bash scripts with npm I want to try using npm to run my various build tasks for a web application. I know I can do this by adding a `scripts` field to my `package.json` like so: This gets unwi...

22 Jan at 01:54

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY I am trying all possible ways to create a React application. I have tried Maven, and now I am trying `create-react-app` from Facebook Incubators. When I...

How to use executables from a package installed locally in node_modules?

How to use executables from a package installed locally in node_modules? How do I use a local version of a module in `node.js`. For example, in my app, I installed coffee-script: This installs it in `...

25 Mar at 11:47

nvm keeps "forgetting" node in new terminal session

nvm keeps "forgetting" node in new terminal session ## Upon using a new terminal session in OS X, nvm forgets the node version and defaults to nothing: `$ nvm ls`: I have to keep hitting `nvm use v.0....

9 Nov at 13:41

How can I change the version of npm using nvm?

How can I change the version of npm using nvm? I've been using NVM to install the latest versions of Node.js for my Node.js work. It works totally fine for installing separate versions and switching b...

9 Aug at 19:32

How to start http-server locally

How to start http-server locally I cloned [angular seed](https://github.com/angular/angular-seed) which is using node `http-server` and it is working perfectly using following configuration. > Command...

10 Jul at 15:15

npm check and update package if needed

npm check and update package if needed We need to integrate Karma test runner into TeamCity and for that I'd like to give sys-engineers small script (powershell or whatever) that would: 1. pick up des...

2 Jan at 15:56