i clone a project with git, the project was create with ionic 2 but when i execute the command for re-create the node_modules folder i get this error.
npm install
npm WARN deprecated [email protected]: Please update to the latest object-keys
npm ERR! code ETARGET
npm ERR! notarget No matching version found for ionic-native@^3.5.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'ionic-hello-world'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wihermes/.npm/_logs/2017-06-02T13_58_47_295Z-debug.log
NOTE: I already update npm.
Does anyone know how to fix it?
This question is related to
npm
Try removing package-lock.json file first
Removing package-lock.json should be the last resort, at least for projects that have reached production status. After having the same error as described in this question, I found that my package-lock.json was corrupt, even though it was generated. One of the packages had itself as an empty dependency, in this example jsdoc:
"jsdoc": {
"version": "x.y.z",
. . . . . .
"dependencies": {
. . . . . ,
"jsdoc": {},
"taffydb": {
. . . . .
Please note I have omitted irrelevant parts of the code in this example.
I just removed the empty dependency "jsdoc": {}, and it was OK again.
If none of this did not help, then try to swap ^ in "^version" to ~ "~version".
Probably not the case of everybody but I had the same problem. I was using the last, in my case, the error was because I was using jfrog manage from the company where I am working.
npm config list
The result was
; cli configs
metrics-registry = "https://COMPANYNAME.jfrog.io/COMPANYNAM/api/npm/npm/"
scope = ""
user-agent = "npm/6.3.0 node/v8.11.2 win32 x64"
; userconfig C:\Users\USER\.npmrc
always-auth = true
email = "XXXXXXXXX"
registry = "https://COMPANYNAME.jfrog.io/COMPANYNAME/api/npm/npm/"
; builtin config undefined
prefix = "C:\\Users\\XXXXX\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\WINDOWS\system32
; HOME = C:\Users\XXXXXX
; "npm config ls -l" to show all defaults.
I solve the problem by using the global metrics.
try
npm install --force
npm install --legacy-peer-deps
first, in C:\users\your PC
write npm uninstall -g create-react-app
then, create your project folder with npx create-react-app folder-name
.
Try removing "package-lock.json" and running "npm install && npm update", it'll install the latest version and clear all errors.
Source: Stackoverflow.com