React-native-windows: Initialization failure on npx react-native-windows-init --overwrite

Created on 22 Jun 2020  路  7Comments  路  Source: microsoft/react-native-windows

Hi,
I have problem when I run this command it can no longer execute it
npx react-native-windows-init --overwrite
because it cannot find the package of react-native-windows@^0.61.0-0

Reading application name from package.json...
Reading react-native version from node_modules...
Reading react-native version from node_modules...
Latest matching version of react-native-windows for [email protected] is [email protected]
Installing react-native-windows@^0.61.0-0...
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected].
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! A complete log of this run can be found in:
npm ERR!     C:\Users\alessandrobartoli\AppData\Roaming\npm-cache\_logs\2020-06-22T15_45_34_650Z-debug.log
Command failed: npm install --save react-native-windows@^0.61.0-0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected].
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! A complete log of this run can be found in:
npm ERR!     C:\Users\alessandrobartoli\AppData\Roaming\npm-cache\_logs\2020-06-22T15_45_34_650Z-debug.log

Error: Command failed: npm install --save react-native-windows@^0.61.0-0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

I hope you can help me

npm version: 6.11.3
node version: v12.11.1

CLI Blocking bug

Most helpful comment

@barto98 and @hfsnetbr,

I have the same issue. I found a work-around to get it to work. Not saying that this is the best solution... But it will at least hopefully unblock you guys for now.

First install @react-native-community/cli locally in your project.

npm i @react-native-community/cli

Then run the following command to init react-native-windows

npx react-native-windows-init --version 0.61.14 --overwrite

All 7 comments

I have the same issue here.

@barto98 and @hfsnetbr,

I have the same issue. I found a work-around to get it to work. Not saying that this is the best solution... But it will at least hopefully unblock you guys for now.

First install @react-native-community/cli locally in your project.

npm i @react-native-community/cli

Then run the following command to init react-native-windows

npx react-native-windows-init --version 0.61.14 --overwrite

@acoates-ms It looks like an issue with react-native-windows-init against version 61. I had issues as well. Can you take a look?

Same here.

@barto98 and @hfsnetbr,

I have the same issue. I found a work-around to get it to work. Not saying that this is the best solution... But it will at least hopefully unblock you guys for now.

First install @react-native-community/cli locally in your project.

npm i @react-native-community/cli

Then run the following command to init react-native-windows

npx react-native-windows-init --version 0.61.14 --overwrite

I can't say if it's the best trick for the moment, but it worked as it should. Gratitude!

@barto98 and @hfsnetbr,
I have the same issue. I found a work-around to get it to work. Not saying that this is the best solution... But it will at least hopefully unblock you guys for now.
First install @react-native-community/cli locally in your project.
npm i @react-native-community/cli
Then run the following command to init react-native-windows
npx react-native-windows-init --version 0.61.14 --overwrite

I can't say if it's the best trick for the moment, but it worked as it should. Gratitude!

You can remove @react-native-community/cli afterwards from your package.json. Its just needed for the other command to work properly!

@btav thank you very much! it's working fine now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KristijanZic picture KristijanZic  路  3Comments

qmatteoq picture qmatteoq  路  3Comments

GurtejSafaltek picture GurtejSafaltek  路  3Comments

chai41104 picture chai41104  路  3Comments

namrog84 picture namrog84  路  4Comments