tagged [npm]

What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?

What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that? I'm trying to run `npm install` in the angular project folder I got from ...

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

Getting "Cannot read property 'pickAlgorithm' of null" error in react native

Getting "Cannot read property 'pickAlgorithm' of null" error in react native I get an error when running `npm install`. The error is: I did the following but the error stays: 1. Deleted node-modules 2...

14 Oct at 08:54

Command to remove all npm modules globally

Command to remove all npm modules globally Is there a command to remove all global npm modules? If not, what do you suggest?

17 Sep at 17:1

SyntaxError: Cannot use import statement outside a module

SyntaxError: Cannot use import statement outside a module I've got an project that's giving me trouble, so I thought I might update it and ran into issues when using the latest Babel. My "index.js" is...

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap I already installed node.js in my machine, But when I try `npm ins...

20 Aug at 05:33

The NPM script 'start' exited without indicating that the create-react-app server was listening for requests

The NPM script 'start' exited without indicating that the create-react-app server was listening for requests I faced with this problem: ![enter image description here](https://i.stack.imgur.com/h8LpA....

18 Jul at 05:37

NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'

NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0' When creating a new Angular 5 project: node version: 8.9.2 npm version: 5.5.1 My Command is: The Error is: ...

12 Jul at 08:43

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

bower command not found

bower command not found I tried to install twitter bower on my Mac, and I used Then I tried `bower --help`, and the output was `bower command not found`. Why is that?

11 May at 03:26

Laravel Mix "sh: 1: cross-env: not found error"

Laravel Mix "sh: 1: cross-env: not found error" I have been trying to set up Laravel Mix in my project and followed the install guide on the Laravel website however keep getting errors. ``` { "privat...

4 May at 16:16

npm ERR cb() never called

npm ERR cb() never called I have a Node.js app hosted on Heroku. Every time I do a `git push heroku` I get the following error: ``` Counting objects: 14, done. Delta compression using up to 6 threads....

12 Apr at 04:23

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...

How to set environment variables from within package.json?

How to set environment variables from within package.json? How to set some environment variables from within `package.json` to be used with `npm start` like commands? Here's what I currently have in m...

14 Jan at 10:46

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...

Should I check in folder "node_modules" to Git when creating a Node.js app on Heroku?

Should I check in folder "node_modules" to Git when creating a Node.js app on Heroku? I followed the basic instructions for Node.js on Heroku here: [https://devcenter.heroku.com/categories/nodejs](htt...

2 Jan at 16:55

Start script missing error when running npm start

Start script missing error when running npm start I'm receiving this error when trying to debug my node application using the `npm start` command. Error: ``` npm ERR! Windows_NT 6.3.9600 npm ERR! argv...

DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server

DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server Getting error when script move to other server. > (node:15707) [DEP0005] Depreca...

14 Dec at 14:13

Error: PostCSS plugin tailwindcss requires PostCSS 8

Error: PostCSS plugin tailwindcss requires PostCSS 8 I installed the new tailwindcss version 2.0 and I've got the following error. I tried to uninstall postcss and tailwindcss but it does not work. Ne...

22 Nov at 23:7

Is there any way to fix package-lock.json lockfileVersion so npm uses a specific format?

Is there any way to fix package-lock.json lockfileVersion so npm uses a specific format? If two different developers are using different versions of node (12/15) & npm (6/7) in a project that was orig...

13 Nov at 00:24

Unable to resolve dependency tree Reactjs

Unable to resolve dependency tree Reactjs I am trying to install react-tinder-card in my current project.So i am tring to install the react-tinder-card but after i use the command npm install --save r...

6 Nov at 16:50

Accessing non-existent property 'padLevels' of module exports inside circular dependency

Accessing non-existent property 'padLevels' of module exports inside circular dependency I just `> npm i -g phonegap@9.0.0` and `> phonegap --version`. It says not only `9.0.0` but also: ``` (node:183...

6 Nov at 11:15

What is the difference between --save and --save-dev?

What is the difference between --save and --save-dev? What is the difference between: and: and: What does this mean? And what is really the effect of `--save` and `-dev` keywords?

20 Sep at 06:45

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

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...