React Native 'autolinks' module that I removed - reactjs

I have react-native-sharing-winstagram in my React Native project. I tried to remove all references to it in the project: I removed it from 'package.json', did yarn install and cd ios && pod deintegrate. I searched through the project and didn't find any remaining references to the package. I did pod install and it said:
Auto-linking React Native modules for target <main target>: BVLinearGradient, RNFirebase, RNReactNativeSharingWinstagram, ...
RNReactNativeSharingWinstagram is causing problems, and I can't figure out how to totally remove it. What can I do besides remove it from package.json?

Related

how to install react-boostrap using pnpm

The project I am working on currently uses pnpm as the package manager, I tried to install the react-boostrap library package in the project (pnpm i react-bootstrap) but this did not work. I also checked the node_module folder and there is a file of react-boostrap but it is not working.
i already search on internet but didn't get proper solution, so i tried this command pnpm i react-boostrap but didn't work.
remember i am using vite as front end tool.
pnpm 7.17.1
react 8.15.0
vite 8.15.0
You probably forgot to include css. You have to do it manually:
https://react-bootstrap.github.io/getting-started/introduction#stylesheets

What's the difference?? REACT vs REACT_PROJECT vs WEBPACK_REACT for storybook

after 'npx sb init'
menu list
I installed all of them and what I got is..
file list
I really don't know how/what they are different..
what's the point of 'react, react_prject,webpack_react' ??
As you can see in the Storybook file:
https://github.com/storybookjs/storybook/blob/next/lib/cli/src/project_types.ts
In REACT_PROJECT the react configured as peer dependency as for REACT it's dependency. WEBPACK_REACT contains react & webpack as dependencies.
The difference between them explained well here:
What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?
From the installation docs:
The command above will make the following changes to your local environment:
📦 Install the required dependencies.
🛠 Setup the necessary scripts to run and build Storybook.
🛠 Add the default Storybook configuration.
📝 Add some boilerplate stories to get you started.

Can't npm start my React project with eslint dependencies

I installed eslint in my react project to fix all the eslint errors. I fixed all the errors, however, I can't npm start the project. When I do that, I get this error, and some steps to uninstall all the eslint dependencies. I want to run the project with eslint dependencies.
Please let me know how to do this?
Error Message:
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"eslint": "^7.11.0"
Don't try to install it manually: your package manager does it
automatically. However, a different version of eslint was detected
higher up in the tree:
My guess would be that you installed eslint#v8 and since create-react-app doesn't support it yet (reference) it causes this error.
Downgrading to eslint v7 should fix it.
Create react app already comes bundled with eslint and by installing it in the project dependencies, you are in effect try to load in conflicting versions, you shouldn't need eslint inside of your own package.json.
HOWEVER
If you want to override eslint and start customising your react install you are more than welcome to eject (npm run eject), but bear in mind that ejecting your application will mean you will need to maintain dependencies going forwards.
You can read more about ejecting here - https://create-react-app.dev/docs/available-scripts/

Should I mention react-native as a dependency for my react-native library?

I'm creating a react-native library that needs some of react-native modules in order to work.
Should I mention react-native as a dependency for my project in package.json dependencies?
I saw some other react-native npm packages which mentioned react-native as devDependencies. why they do that?
If it's required for the app to work, you should specify it as a dependency in your package.json.
If it's required, but the user will always have react-native available (e.g. if your library is being used as part of a larger react-native project) you can set it in peerDependencies. This means your app needs it to work, but it doesn't automatically bundle react-native with your code.

Is Shrinkwrap preventing me from updating react and react-dom?

I am trying to update react from 15.4.2 to 16.2.0. Main dependencies I am concerned about is React and React-Dom. I am trying to run: npm uninstall --save react react-dom and then npm install --save react react-dom however I keep getting the message: UNMET PEER DEPENDENCY react#16.2.0 react-dom#16.2.0 so this makes me think it's a shrink or tied down dependency but can't seem to find it. I have tried to even remove react and react-dom from the dependencies in package.json. Still no avail.
Issue:
My root issue is I coudn't run material ui components with tap react and more specifically the Tabs and it's touch/tap feature. Real problem is I believe I had other node_modules,package.jsons in root folder where my app/components were in so more than one node_module and package.json files and folders which caused the clash.
To resolve:
Make a copy of your business logic from app where you cannot update
Then navigate into/create new directory and
Scaffolded new react project in there (react-app or in my case Yo #microsoft/sharepoint)
Checked the react, reactdom versions in node_modules folder and package.json from within the application that's not updating to see if they're latest versions...they weren't so I did the following updates:
3.2. npm install --save react react-dom (you may have to run npm uninstall react react-dom first)
3.3. npm install material-ui#latest
3.4 npm i --save react-tap-event-plugin#3.0.2
Check if versions have updated in folders above in step 3...they have now.
Try to import and create tap react app components again e.g. Tabs and now it should work
Conclusion:
It was not Shrinkwrap itself that was causing the issue but the duplication of node_module files and/or package.json files. See Material-UI Tabs have stopped working for more info.
Also remember Create React app will not work with some versions of React and React Dom. So be wary of this.
Some things you could try:
check the version of react and react-dom inside the node_modules/ folder
remove node_modules/ and reinstall it again to remove any stall dependencies

Resources