Error when using 'create-react-native-app' - react-native

I tried to create a new React Native app using the command create-react-native-app in the node.js terminal on my Windows system. I got the following terminal error:
D:\project>create-react-native-app crna
Creating a new React Native app in D:\project\crna.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Suppor
t
npm WARN deprecated #exponent/spawn-async#1.2.8: Please switch to #expo/spawn-as
ync, the new name of this package. It's the same code with our new name.
npm ERR! shasum check failed for C:\Users\ui-admin\AppData\Local\Temp\npm-3204-a
eacedd1\registry.npmjs.org\_40exponent\ngrok\-\ngrok-2.2.7.tgz
npm ERR! Expected: 37fe66f922b1003da2a78c66b7d4d3bc9313e423
npm ERR! Actual: d134060eb730b880da06d5c040ca933f6a75b613
npm ERR! From: https://registry.npmjs.org/#exponent/ngrok/-/ngrok-2.2.7.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ui-admin\AppData\Roaming\npm-cache\_logs\2017-05-26T09_36_
04_379Z-debug.log
`npm install --save-dev --save-exact react-native-scripts` failed
Anyone met this error or fix it?

I got the same error, though in RubyMine, which provided the response that react-native doesn't work with npm 5 yet. it said you can either revert to npm 4 or feel free to log an issue here: https://github.com/npm/npm/issues/16991
I think you're best bet would be to revert and wait it out!

Related

I can't install anything with npm command line

I have been using npm for some time with ionic. Recently, it started giving an error when trying to install anything both packages and modules. Even with react native it gives the same error.
I have tried re-installing it, but that didn't fix it. I created a new user on my Windows system, but it's still not working, and I noticed that when I search for the error code on Google, I get no results.
C:\WINDOWS\system32>npm install -g ionic
npm ERR! error:0909006C:PEM routines:get_name:no start line
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OLAMIDE AWOBUSUYI\AppData\Roaming\npm-cache_logs\2019-07-11T19_47_18_673Z-debug.logenter image description here
Try to set the npm registry:
npm set registry http://registry.npmjs.org/

why does react native form installation give an error?

I tried to install react-native-dynamic-form. Now npm is also not working.
Why isn't it?
PS D:\reactNative> npm install -g react-native-cli
npm ERR! code E405
npm ERR! 405 Method Not Allowed - GET https://registry.npmjs.org/react-
native-dynamic-form/react-native-dynamic-form/react-native-cli
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-04-
25T11_13_54_616Z-debug.log
giving error, 405?
Many problems related with npm have some common solutions.
Here is 2 of them:
Try to update npm with command npm update or just npm install - (this one just install's the latest version so this 2 commands are common)
Try to clean Your cache with npm cache clean
Good luck :)

unable to downgrade from angular 6 to angular 5

I created my project using angular 6 but due to some reasons i want to rollback to angular 5,I tried following commands but it is showing some errors.
node version- 10.4.1
npm version-6.1.0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for #angular/cli#1.7.
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\TEKIZMA USER\AppData\Roaming\npm-cache\_logs\2018-06-
27T0
_21_53_446Z-debug.log
Please try to follow this Stack Answer
According to my knowledge first, try to downgrade NPM then angular.
And you might need to read this too.
Try possibly this way
npm install -g #angular/cli#YOUR_DESIRED_VERSION
You do not need to reinstall global version of Angular CLI.
Instead, you can use NPX library like:
npx -p #angular/cli#<version> new <app-name>

Error when yarn add and npm i

Good evening!
i'm trying to add some packages to my native react application but it's not working with either npm or yarn. i have uninstalled and reinstalled yarn but it has not changed anything
I use Windows 10.
for yarn :
yarn add react-navigation
yarn add v1.5.1
[1/4] Resolving packages...
error An unexpected error occurred: "Couldn't find the binary git".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\Boubacar\\Desktop\\blob\\essai\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
for npm :
npm i react-navigation
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Boubacar\AppData\Roaming\npm-cache\_logs\2018-04-08T00_02_28_158Z-debug.log.
Help me please!
The console log is plain and clear.
error An unexpected error occurred: "Couldn't find the binary git".
Check/Install Git on your system.
For Windows users, need to set environment path, like
C:\Program Files\Git\cmd

Not able to eject again after eject react native

I am new to reactnative, I have successfully eject to a native build, and I found some thing to tweak after reactnative so I want to edit the js again and eject again.
But I found it not able to eject using npm run eject again and it shows the following error:
npm run eject
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "eject"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! missing script: eject
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/xxx/work/reactnative/maoquote/npm-debug.log
And I checked the package.json in the project folder, and the eject block was missing, but I am sure that the eject block was there before I first ejection the project, seems the framework has removed it after ejection?
Don't know why reactnative not allow me to eject again, is there any way I could do that?
I am using reactnative version 0.45
thanks !
You created the project using create-react-native-app ? Unfortunately, ejecting is not reversible, you should use your version control to manual roll back.
See Ejecting:
"Ejecting" is the process of setting up your own custom builds for
your CRNA app. It can be necessary to do if you have needs that aren't
covered by CRNA, but please note that aside from the use of version
control systems (git, hg, etc.) it is not reversible.