any one can help me? i have a problem when i run 'npm start'. this is the
Error Message
Try to run npm install jest-serializer before doing npm start. If that is still not working,
rm -rf node modules
npm install
npm start
Related
Has anyone experience this error with expo, when running react-native run-android?
error: bundling failed: Error: Unable to resolve module `./Linking/Linking` from `node_modules/expo/build/ExpoLazy.js`:
None of these files exist:
* node_modules/expo/build/Linking/Linking(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
* node_modules/expo/build/Linking/Linking/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
"expo": "^37.0.9",
Just ran into this issue, downgrade to 37.0.8 (no caret) and do an npm i. Looks like they released 37.0.9 yesterday and it has an issue.
What worked for me:
1) In package.json change to "expo": "37.0.8"
2) Delete your node_modules
3) installl packages npm i
4) clean cache in expo expo r -c
Now it started to work again. Couldn't find the last step in previous comments.
This is an Internal bug of react-native. You don't have much of a choice, as user3916570 consider downgrading.
For now, downgrading Expo to 37.0.8 fixed this. To downgrade, in your package.json, change your Expo dependency to:
"expo": "37.0.8",
Then remove your node_modules and reinstall everything:
rm -rf node_modules
npm i
It's not an expo version problem only, you should also check the global expo-cli version and probably node as well.
Run:
$ npm install -g expo-cli --force
$ rm -rf node_modules/
$ rm -rf package-lock.json
# (in my case mac '$ brew upgrade node && npm install -g npm')
$ npm install
$ npm run
I am getting these errors while running my app.
bundling failed: Error: Unable to resolve module ` react-native-screens` from `node_modules/react-navigation-tabs/src/navigators/createBottomTabNavigator.js`
How to solve this error. I just reinstalled the node modules and again installed the modules. Can someone help?
Depending on your react native version for >= 0.60.x just run :
npm install react-native-screens
and for <= 0.59.9 :
npm install react-native-screens
react-native link react-native-screens
as of react native >= 0.60 there is no need for manually linking
so for your issue
remove node_modules folder
and then
npm install
npm install react-native-screens
or
yarn
yarn add react-native-screen
close the terminal
clean the project => cd android => ./gradlew clean
remove the old app
then re run
Run following commands
npm install react-native-screens
react-native link react-native-screens
i have created a fresh new React native application, however if i try to run the app using npx react-native run-android i'm getting the error.
npm ERR! code ENOLOCAL
npm ERR! Could not install from "PC\AppData\Roaming\npm-cache\_npx\15180" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ramesh PC\AppData\Roaming\npm-cache\_logs\2020-02-09T09_22_11_453Z-debug.log
Install for [ 'react-native#latest' ] failed with code 1
Why we receive this error?.
Its really annoying by seeing the people are giving -ve vote for my question without proper reason.
it may be useful for someone who is really facing the issue
follow below steps
you can change "npm-cache" folder to anothor path,
using command :
"npm config set cache C:\tmp\nodejs\npm-cache --global"
This will resolve the issue.
More info https://github.com/zkat/npx/issues/146
I did a lot to solve this almost spend 2 hr in mine case i was not allow to delete package-lock.json
uninstall node
brew uninstall node;
# or `brew uninstall --force node` which removes all versions
brew cleanup;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;
install again
brew install node;
which node # => /usr/local/bin/node
export NODE_PATH='/usr/local/lib/node_modules' # <--- add this ~/.bashrc
Before reading and following the tutorial in NPM I installed the react-native-cli globally and it worked just fine
But in the tutorial it asks you to install sinopia
https://www.npmjs.com/package/react-native-cli
Then it gives you these instructions
react-native$ npm set registry http://localhost:4873/
react-native$ npm adduser --registry http://localhost:4873/
# Check that it worked:
react-native$ npm config list
react-native$ npm unpublish --force
react-native$ npm publish
react-native$ cd react-native-cli/
react-native-cli$ npm unpublish --force
react-native-cli$ npm publish
But the unpublish part gave me an error. the same for the 'publish' aprt.
(By the way, publish what?!)
Then it says to uninstall react-native-cli
npm uninstall -g react-native-cli
After that I couldn't reinstall react-native-cli.
It says the package is not available.
npm ERR! 404 no such package available : react-native-cli
npm ERR! 404
npm ERR! 404 'react-native-cli' is not in the npm registry.
What is this?! How can I fix it?
#edit
By the way, I don't understand why, in the Get Started tutorial it doesn't tell us how to install the react-native-cli nor gives us a link. It just states:
The React Native CLI #
Node.js comes with npm, which lets you install the React Native command line interface.
#edit2
I just managed to install react-native-cli by removing the 'registry' entry from npm config, installing it and adding Sinopia again.
I thought Sinopia worked as a proxy. If it is not found in local repository, it looks for it in NPMJS...
I even tried to install other things and I could (wdio, nodemon), I just got an error with react-native-cli.
It seems that something is wrong.
Seems like you on Windows
I don't think you need sinopia.
Tutorials was little improved on master branch of the docs: http://facebook.github.io/react-native/releases/next/docs/getting-started.html
In short:
Install node.js
Install react-native-cli: npm install react-native-cli
Install & setup Android SDK
Create & run project
react-native init AwesomeProject
cd AwesomeProject
react-native start
react-native run-android
When I run the ionic build android command, I get the following error:
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp'
Do you need to run `npm install`?
I have already tried running this command:
npm install --save-dev gulp
But I am still getting the same error. Am I missing something here?
You need to install Gulp globally using the following command: npm install --global gulp-cli, as described in the Gulp documentation.
Please try to run the following commands:
npm install -g gulp
npm install