react-native-ble-plx: 'react-native link' unrecognized
Started with a new project:
react-native init appName
cd appName
Verified that react-native link works. Successful
Added react-native-ble-plx:
npm install --save react-native-ble-plx
Tried react-native link, receive error:
“Command link unrecognized. Make sure that you have run npm install and that you are inside a react-native project.”
“dependencies”: { “react”: “16.0.0-alpha.12”, “react-native”: “0.45.1”, “react-native-ble-plx”: “^0.6.0” }
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 35 (3 by maintainers)
I have the same issue. I was able to get around it by deleting
node_modulesand typingyarn.Fell victim to this. My mistake was that I ran
react-native linkinside the wrong folder. I was in theandroid/folder. Forreact-native linkto work you need to be located at the root of your React Native project.This is because the command
react-nativeonly has the commandinitavailable globally. All other commands, for examplelink, rely on the React Native version you have installed innode_modules.npm install native-base --save npm install react-native link
This sequence worked for me
if you want add fonts, for react native 0.69 run npx react-native-asset
I believe this happens after you add any new library merely run yarn install after adding any library and later react-native link should definitely work
react-native linkcan not be used in “create-react native-app” projects.I run the
npm installand my problem was solved@Memexp you need to install react-native globally for the command to be found in your path
npm install -g react-native-clioryarn add global react-native-cliFor others here too delete your node_modules and package-lock.json file then run
yarnto install dependencies with yarn then attempt link again and useyarnto run, worked for me.no one solution is running for me
Make sure your folder name and package.json name are equals. I made that mistake, I accidently changed the name in the package.json
Me too, none of them works for me.
@sangampandey thanks your solution worked for me
This should work:
npm install --save react-native-firebasereact-native link react-native-firebasenpm installinside the project folder solved the problem.same! yarn FTW~