How do I solve npm install issue after deleting node_modules - node.js

I am trying to clean out my react-native project's package to do a clean npm install on a MacOS based system (my windows system for Android development has no issues in cleaning up package versions).
I started seeing errors in the npm instals complaining version differences betwces are not compatible and list differences between versions of each package in "rook project" and node_modules/ directory.
I do the usual fix by removing package-lock.json, delete the node_modules directory and re-run npm install. from my project folder. It immediately made the same error complaints. The problem is this, there is no node_modules in my project folder as I deleted it. And it did not create a new node_modules directory.
Given this issue, how do I debug this and fix it? Questions I'd like to find out:
how do I tell npm to tell me what it thinks root project value is (full path)?
How to tell npm to tell me where the full path to the node_modules directory it seems to see?
Finally, how do I force npm to do the right thing and focus my my project's collaterals and not look outside the project folder as it appears to be doing?
Some of my thoughts. I don't understand why it is making a package cersion comparison between root project and node_modules?
Seems that nodde and npm are doing different things in MacOS environment than in my windows system environment -- I don't understand this.
Anyone here can help me understand what is going on and how to solve it?
The Error output here:
thomas#Presonus americanaradio % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: AmericanaRadio#0.0.2
npm ERR! Found: react#16.14.0
npm ERR! node_modules/react
npm ERR! react#"^16.13.1" from the root project
npm ERR! peer react#"^16.8" from
#react-native-community/async-storage#1.12.1
npm ERR! node_modules/#react-native-community/async-storage
npm ERR! #react-native-community/async-storage#"^1.12.1" from the
root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"17.0.2" from react-native#0.66.4
npm ERR! node_modules/react-native
npm ERR! react-native#"^0.66.3" from the root project
npm ERR! peer react-native#">=0.59" from
#react-native-community/async-storage#1.12.1
npm ERR! node_modules/#react-native-community/async-storage
npm ERR! #react-native-community/async-storage#"^1.12.1" from the
root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency
resolution.
npm ERR!
npm ERR! See /Users/thomas/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/thomas/.npm/_logs/2021-12-10T15_47_02_669Z-debug.log
thomas#Presonus americanaradio %
The package.json content here:
{END)
"name": "AmericanaRadio",
"version": "0.0.2",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#react-native-community/async-storage": "^1.12.1",
"#react-native-community/checkbox": "^0.5.2",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-community/slider": "^3.0.3",
"node-fetch": "^2.6.1",
"react": "^16.13.1",
"react-native": "^0.66.3",
"react-native-background-timer": "^2.4.1",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "^1.9.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-reanimated": "^2.2.4",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.15.2",
"react-native-simple-survey": "^3.1.2",
"react-native-swift": "^1.2.1",
"react-native-vector-icons": "^8.0.0",
"react-native-version-check": "^3.4.2",
"react-native-version-info": "^1.1.0",
"react-native-webview": "^11.3.1",
"react-navigation": "^4.4.3",
"react-navigation-drawer": "^2.6.0",
"react-navigation-stack": "^2.10.2",
"react-usestateref": "^1.0.8",
"socket.io-client": "^4.4.0"
},
"devDependencies": {
"#babel/core": "^7.12.10",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.18.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"react-test-renderer": "16.13.1"
},
"jest": {
"preset": "react-native"
}
}
~
(END)
As noted in my description, the node_modules directory was deleted and running npm install failed and did not create a nodes_modules directory. So the error messages are confusing as I have no packages in my project directory (americanaradio).
Thank you for taking a look at this and hopefully a solution can come out of ths.

First check what library is giving you an error and try to reinstall or update that version . Try deleting node modules also . Then do npm install.

Related

Angular dependency issue Windows to Linux

I'm trying to host an Angular application for a customer, but I can't get it to run on Linux. The customer develops on Windows and it works for him. I am using NodeJS 19.
Error message when npm install:
npm notice
npm notice New minor version of npm available! 9.2.0 -> 9.3.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.3.1>
npm notice Run `npm install -g npm#9.3.1` to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #agm/core#3.0.0-beta.0
npm ERR! Found: #angular/common#14.2.12
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"^14.2.0" from the root project
npm ERR! peer #angular/common#"^14.0.0 || ^15.0.0" from #angular/cdk#14.2.7
npm ERR! node_modules/#angular/cdk
npm ERR! #angular/cdk#"^14.2.4" from the root project
npm ERR! peer #angular/cdk#"14.2.7" from #angular/material#14.2.7
npm ERR! node_modules/#angular/material
npm ERR! #angular/material#"^14.2.4" from the root project
npm ERR! 1 more (#angular/material-moment-adapter)
npm ERR! 5 more (#angular/forms, #angular/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^9.1.0 || ^10.0.0" from #agm/core#3.0.0-beta.0
npm ERR! node_modules/#agm/core
npm ERR! #agm/core#"^3.0.0-beta.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/common#10.2.5
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"^9.1.0 || ^10.0.0" from #agm/core#3.0.0-beta.0
npm ERR! node_modules/#agm/core
npm ERR! #agm/core#"^3.0.0-beta.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
package.json
{
"name": "web-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#agm/core": "^3.0.0-beta.0",
"#angular/animations": "^14.2.0",
"#angular/cdk": "^14.2.4",
"#angular/common": "^14.2.0",
"#angular/compiler": "^14.2.0",
"#angular/core": "^14.2.0",
"#angular/forms": "^14.2.10",
"#angular/material": "^14.2.4",
"#angular/material-moment-adapter": "^14.2.5",
"#angular/platform-browser": "^14.2.10",
"#angular/platform-browser-dynamic": "^14.2.0",
"#angular/router": "^14.2.10",
"#manekinekko/angular-web-bluetooth": "^11.2.2",
"#types/googlemaps": "^3.39.13",
"#types/maplibre-gl": "^1.14.0",
"#types/web-bluetooth": "^0.0.16",
"bootstrap": "^3.4.1",
"maplibre-gl": "^1.15.3",
"moment": "^2.29.4",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^14.2.2",
"#angular/cli": "~14.2.2",
"#angular/compiler-cli": "^14.2.0",
"#types/geojson": "^7946.0.10",
"#types/jasmine": "~4.0.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2"
}
}
I have already tried --force and --legacy-peer-deps but it still doesn't work.
A couple of things here.
First one of the packages you're using doesn't like the version of Angular you're using.
#agm/core#3.0.0-beta.0
This says that #agm/core#3.0.0-beta.0 is made for angular 9-10 and you're running 14.
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^9.1.0 || ^10.0.0" from #agm/core#3.0.0-beta.0
npm ERR! node_modules/#agm/core
npm ERR! #agm/core#"^3.0.0-beta.0" from the root project
If you MUST use this version of #agm/core#3.0.0-beta.0 then you can run:
npm install --legacy-peer-deps
But this is not best practice. It's better to look for a version that works with your Angular version. A quick look at that package (npm view #agm/core versions --json) shows me that you have the latest version, since it's dependency is Angular 9-10 you might want to look for a replacement library that works with your version of Angular.
Second, you are using a development version of node, meaning that 19 is the latest but not considered stable by node.js- odd numbers for development, even numbers for production, current stable version is 18.13.0:
https://nodejs.org/en/download/
If you want to use multiple versions of node, you can use nvm (Node version manager)
Your version of node.js needs to match the installation version of node.js - so the Windows machine and the Linux machine need to both have the same version of node.js - that might be why it works in one place and not the other.

Why cant i install Angular Bootstrap?

Angular CLI: 14.2.3
Node: 16.15.1
Package Manager: npm 8.12.1
OS: darwin x64
I am installing angular bootstrap (trying to) getting the following error from NPM
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: tractapp#0.0.0
npm ERR! Found: #angular/core#14.2.2
npm ERR! node_modules/#angular/core
npm ERR! peer #angular/core#"14.2.2" from #angular/animations#14.2.2
npm ERR! node_modules/#angular/animations
npm ERR! peer #angular/animations#"^14.0.0 || ^15.0.0" from #angular/material#14.2.2
npm ERR! node_modules/#angular/material
npm ERR! #angular/material#"^14.2.2" from the root project
npm ERR! peerOptional #angular/animations#"14.2.2" from #angular/platform-browser#14.2.2
npm ERR! node_modules/#angular/platform-browser
npm ERR! peer #angular/platform-browser#"^12.0.0 || ^13.0.0 || ^14.0.0" from #angular/fire#7.4.1
npm ERR! node_modules/#angular/fire
npm ERR! #angular/fire#"^7.4.1" from the root project
npm ERR! 6 more (#angular/forms, #angular/material, ...)
npm ERR! 2 more (#swimlane/ngx-charts, the root project)
npm ERR! peer #angular/core#"^14.0.0 || ^15.0.0" from #angular/cdk#14.2.2
npm ERR! node_modules/#angular/cdk
npm ERR! peer #angular/cdk#"14.2.2" from #angular/material#14.2.2
npm ERR! node_modules/#angular/material
npm ERR! #angular/material#"^14.2.2" from the root project
npm ERR! peer #angular/cdk#">=12.0.0" from #swimlane/ngx-charts#20.1.0
npm ERR! node_modules/#swimlane/ngx-charts
npm ERR! #swimlane/ngx-charts#"^20.1.0" from the root project
npm ERR! 2 more (ng2-charts, the root project)
npm ERR! 16 more (#angular/common, #angular/compiler, #angular/fire, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! #ng-bootstrap/ng-bootstrap#"13.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/core#14.2.6
npm ERR! node_modules/#angular/core
npm ERR! peer #angular/core#"14.2.6" from #angular/forms#14.2.6
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^14.2.0" from the root project
npm ERR! peer #angular/forms#"^14.1.0" from #ng-bootstrap/ng-bootstrap#13.0.0
npm ERR! node_modules/#ng-bootstrap/ng-bootstrap
npm ERR! #ng-bootstrap/ng-bootstrap#"13.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
NPM errors and how these are stated is not my strong suit of understanding, would love if someone could help me out and point me in the right direction here.
Thanks!
Heres my package.json file aswell, im assuming its something in there by the way the error is formed/stated.
{
"name": "tractapp",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#angular/animations": "^14.2.0",
"#angular/cdk": "^14.2.2",
"#angular/common": "^14.2.0",
"#angular/compiler": "^14.2.0",
"#angular/core": "^14.2.0",
"#angular/fire": "^7.4.1",
"#angular/forms": "^14.2.0",
"#angular/material": "^14.2.2",
"#angular/platform-browser": "^14.2.0",
"#angular/platform-browser-dynamic": "^14.2.0",
"#angular/router": "^14.2.0",
"#fortawesome/angular-fontawesome": "^0.11.1",
"#fortawesome/fontawesome-svg-core": "^6.2.0",
"#fortawesome/free-solid-svg-icons": "^6.2.0",
"#stripe/stripe-js": "^1.37.0",
"#sweetalert2/ngx-sweetalert2": "^12.0.1",
"#swimlane/ngx-charts": "^20.1.0",
"aos": "^2.3.4",
"apexcharts": "^3.35.5",
"chart.js": "^3.9.1",
"ng-apexcharts": "^1.7.1",
"ng2-charts": "^4.0.1",
"ngx-print": "^1.2.1",
"ngx-stripe": "^14.1.0",
"rxjs": "~7.5.0",
"stripe": "^10.11.0",
"sweetalert2": "^11.5.1",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^14.2.3",
"#angular/cli": "~14.2.3",
"#angular/compiler-cli": "^14.2.0",
"#types/d3": "^7.4.0",
"#types/jasmine": "~4.0.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2"
}
}
Moving the comment to an answer per OP's request and so that the question can be marked resolved.
Looking at the Github releases page (accessed on 10/12/22 for v 13.0.0) the maximum support for the library currently is Angular 14.1, where as you are using 14.2.2. This seems to be a version compatibility issue (essentially the library is trying to pull an older version of Angular and you are getting a conflict)
You either have to downgrade you Angular version or use something else
npm update was perfect to me :D
Run npm update before installing ng bootstrap in your vs code terminal, that will fix it
I had the same problem when I added #angular/service-worker to my ionic project.
The angular version required by #angular/service-worker is different from the version installed at the beginning, and they conflict.
package-lock.json retains the version of angular that was originally installed
So, you can try to delete package-lock.json and rerun npm install

Could not resolve dependency with sanity in nextjs app

I am trying to deploy my next.js project, but I keep getting the following error with everything I do:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: rcd_drone#0.1.0
npm ERR! Found: #sanity/client#3.4.1
npm ERR! node_modules/#sanity/client
npm ERR! #sanity/client#"^3.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #sanity/client#"^2.11.0" from next-sanity-image#3.2.1
npm ERR! node_modules/next-sanity-image
npm ERR! next-sanity-image#"^3.2.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
I also have the following dependencies:
{
"name": "rcd_drone",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"#babel/core": "^7.17.9",
"#sanity/client": "^3.2.0",
"#sanity/image-url": "^1.0.1",
"#stripe/stripe-js": "^1.25.0",
"canvas-confetti": "^1.5.1",
"next": "^12.1.0",
"next-sanity-image": "^3.2.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hot-toast": "^2.2.0",
"react-icons": "^4.3.1",
"frontmatter-markdown-loader": "^3.6.3",
"stripe": "^8.209.0"
},
"devDependencies": {
"#babel/preset-react": "^7.16.7",
"eslint": "8.13.0",
"eslint-config-next": "12.1.4"
}
}
Try doing the npm install --legacy-peer-deps within the Vercel project deploy page.
When deploying your project, go to the "build and output" settings, then in the npm command input write: npm install --legacy-peer-deps.
Select the override radio button, then try deploying.
Try deleting node_modules folder and package-lock.json file and run:
npm install --legacy-peer-deps
This is going to make fresh installation of the modules.

npm error peer invalid webpack-dev-server#2.10.0 wants webpack#^2.2.0 ||

I have installed the dependencies via npm below is the package.json
{
"name": "springbootreactjs2",
"version": "1.0.0",
"description": "Spring boot with reactjs",
"scripts": {
"watch": "webpack --watch -d"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.17.1",
"react": "16.0.0",
"react-dom": "^16.2.0",
"react-router-dom": "^4.2.2",
"rest": "^2.0.0",
"webpack": "^2.2.0"
},
"devDependencies": {
"babel-core": "^6.18.2",
"babel-loader": "7.1",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0"
}
}
Whenever i want to install a dependency it keeps throwing the below error
npm WARN package.json springbootreactjs2#1.0.0 No repository field.
npm WARN package.json springbootreactjs2#1.0.0 No README data
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "react#16.0.0" "--save"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package webpack#3.10.0 does not satisfy its siblings' p
eerDependencies requirements!
npm ERR! peerinvalid Peer babel-loader#6.4.1 wants webpack#1 || 2 || ^2.1.0-beta
|| ^2.2.0-rc
npm ERR! peerinvalid Peer webpack-dev-server#2.10.0 wants webpack#^2.2.0 || ^3.0
.0
npm ERR! Please include the following file with any support request:
Below is the install command i am running
npm install --save reactstrap#next react react-dom
Originally the webpack version was 3.10.0 i manually modified the webpack version to 2.2.0 but still for some reasons is still picking version 3.10.0.
Not sure what's wrong here
Remove any dependencies from your package.json file that you don't have installed locally and try again
Update your npm using npm install -g npm#latest.
Install the missing dependencies using npm install
<dependency_name> and run your command again.
If that doesn't work, read on:
I was facing the same issue. Although I was able to install webpack using npm, I couldn't install webpack-cli. So I:
1) Updated npm version to the latest.
Installed yarn (using yum
or apt-get, etc.).
Installed all the dependencies(including
webpack-cli) using yarn
This solved my problem.

Issue with "npm install" after setting up AngularJS project with Yeoman

My issue appears after (or even during) the creation of the angular project with the command:
yo angular
during the process of installing all the devDependencies from the package.json ("npm install" which yo angular runs) I notice that some modules are missing in the node_modules folder.
So, I downloaded after that again with the "npm install name_of_the_module --save-dev" (so they will download and be included in the package.json in the devDependencies option).
But for example If I remove the node_modules folder and I execute the command npm install it will start the installation but will miss some modules, and sometimes the missing modules are different from the last run of npm install.
I don't know how to face this because I need to set up the project for the team and the first thing they will have to do is executing npm install & bower install (this last one works fine).
The content of package.json is:
{
"name": "angular_test",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-autoprefixer": "^0.7.6",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-htmlmin": "^0.3.0",
"grunt-contrib-imagemin": "^0.8.1",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.4.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-filerev": "^0.2.1",
"grunt-google-cdn": "^0.4.0",
"grunt-karma": "^0.9.0",
"grunt-newer": "^0.7.0",
"grunt-ng-annotate": "^0.3.2",
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.4.0",
"grunt-wiredep": "^1.7.0",
"imagemin-jpegtran": "^2.0.0",
"imagemin-pngquant": "^2.0.0",
"jshint-stylish": "^0.2.0",
"karma": "^0.12.24",
"karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4",
"load-grunt-tasks": "^0.6.0",
"time-grunt": "^0.3.2"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test"
}
}
and the errors or log I get after executing npm install is:
npm WARN optional dep failed, continuing imagemin-optipng#1.0.0
npm WARN optional dep failed, continuing http-signature#0.10.0
npm WARN optional dep failed, continuing imagemin-jpegtran#1.0.0
npm WARN optional dep failed, continuing imagemin-pngquant#1.0.2
npm WARN optional dep failed, continuing imagemin-gifsicle#1.0.0
npm ERR! EEXIST, open 'C:\Users\myself\AppData\Roaming\npm-cache\78af9c6a-m-cache-lodash-2-4-1-package-tgz.lock'
File exists: C:\Users\myself\AppData\Roaming\npm-cache\78af9c6a-m-cache-lodash-2-4-1-package-tgz.lock
Move it away, and try again.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\myself\Documents\PHPStorm_Workspace\angular_test
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path C:\Users\myself\AppData\Roaming\npm-cache\78af9c6a-m-cache-lodash-2-4-1-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0
UPDATE
All these issues appear because of "npm" so after researching a little bit, the creator of npm suggested to download the last version, which is only available either...
npm install -g npm#next
or
npm install -g npm#2.1.2 (in this case is only for the current release 2.1.2, which is the latest release)
or
Downloading the source and copying its content where npm is installed (inside the node_modules folder where you installed node.js):
https://www.versioneye.com/nodejs/npm/2.1.2
When I find the github discussion I will update the post with it.
This is bug and can be fixed by update your npm version (https://github.com/npm/npm/issues/6318).
Try: npm -g install npm#next
File exists:
C:\Users\myself\AppData\Roaming\npm-cache\78af9c6a-m-cache-lodash-2-4-1-package-tgz.lock
Move it away, and try again.
It seems like npm is resolvng from your cache, try # npm cache clear (for more info) to make sure a package isn’t loading anything from npm’s cache.
Most likely due to this bug in npm.

Resources