undefined is not an object(ecaluating 'ReactInternals.ReactCurrentOwner') - react-native

I want to run my react-native project, but an error occurred.
Please give me advise.
Environment
$ npm list --depth=0
nav#0.0.1 /Dev/lrn/rn/nav
├── babel-jest#20.0.3
├── babel-preset-react-native#1.9.2
├── jest#20.0.4
├── UNMET PEER DEPENDENCY react#16.0.0-alpha.6
├── react-native#0.45.1
├── react-navigation#1.0.0-beta.11
└── react-test-renderer#16.0.0-alpha.12
Project Directory
$ls
__tests__ index.android.js node_modules yarn.lock
android index.ios.js package-lock.json
app.json ios package.json
What I Do
$ rm -rf node_modules
$ npm cache clean --force
$ npm install
$ react-native run-ios
Error
Red Screen iPhone Simulator
I think environment was wrong, but what I do cannot correct it.
Thank you for seeing and any advice is welcome. thank you.

I ran into the same problem, after doing some reading on their Github Issues
yarn add react#16.0.0-alpha.12
or
npm i react#16.0.0-alpha.12 --save
did the trick for me.

Related

npm uninstall gives no error, but also doesn't remove package?

I want to remove package #rollup/plugin-graphql#1.1.0 but npm uninstall simply doesn't remove it:
Check installed packages:
npm list --depth=0
├── #apollo/client#3.5.8
├── #rollup/plugin-graphql#1.1.0
// some more packages
Remove package:
npm uninstall #rollup/plugin-graphql#1.1.0
up to date, audited 334 packages in 1s
53 packages are looking for funding
run `npm fund` for details
Check installed packages again:
npm list --depth=0
├── #apollo/client#3.5.8
├── #rollup/plugin-graphql#1.1.0 // <-- still here!
// some more packages
What's going on here? packages.json also doesn't get changed.
I am on npm 8.3.0, node 16.13.1

Npm installed in npm global?

So I'm trying to see what npm packages I have installed globally using this command,
$ npm list -g --depth=0
and I see this,
/usr/local/lib
├── npm#5.5.1
Is npm installed as a package under npm itself? Or did I screw up somewhere and caused some kinda inception installation?
You can use npm ls command to view all the npm packages in your local system

npm install unmet dependencies

I'm trying to install vue-pagination-2 (https://github.com/matfish2/vue-pagination-2) in my application.
I run the following command:
npm install --save vue-pagination-2
but I keep getting this error:
my_project/myProject
├── UNMET PEER DEPENDENCY eslint#3.19.0
└── UNMET PEER DEPENDENCY vue#2.2.6
So I run:
npm install --save vue#2.2.6
But I get exactly the same error.
How can vue#2.2.6 be an unmet dependency since I'm installing exactly that package?
I have already tried to delete node_modules folder and running npm install again.
How can I solve this?
Moreover my package.json file already have those version installed:
"eslint": "^3.19.0",
"vue": "^2.2.6",

├── UNMET PEER DEPENDENCY generator-karma#>=0.9.0

So basically I want to understand why when I run npm install sass-loader node-sass --save-dev I get this error
├── UNMET PEER DEPENDENCY generator-karma#>=0.9.0
However it's clear that Karma is installed since when I run npm install generator-karma I see that :
└─┬ generator-karma#2.0.0 <--- Which mean karma is there...
└─┬ yeoman-generator#0.22.6
├── async#1.5.2
...
I've read answer explaining I should use npm install -g grunt-cli bower yo generator-karma generator-angular but this is not helping much.
Should I uninstall and reinstall a clean node_modules ?
npm no longer installs module dependencies automatically. That means you have to install the dependencies modules yourself. Basically if you run npm install generator-karma#>=0.9.0 and then run the your previous npm install command you should be good to go.

Install global typings from npm script

Installed typings globally
> npm install typings -g
Installed several typings
> typings install dt~angular --save --global
> typings install dt~angular-ui-router --save --global
> typings install dt~ui-grid --save --global
> typings install npm~lodash --save
All works fine, typings.json file is created together with typings folder. And when I run "typings install" from command line I get expected output
> typings install
├── lodash#4.0.0
├── angular (global)
├── angular-ui-router (global)
└── ui-grid (global)
Then I add npm script to automate a little bit project deployment
"scripts": {
"install": "typings install"
},
But when I try to run "npm install" only module typings are installed. Global typings are completely ignored
> typings install
└── lodash#4.0.0
Tried to add --global flags into package.json but without success.
Most likely you have a LOCAL version of typings that is not 1.3.2
Run npm install -D typings#latest