Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native new-module #68

Open
1 of 2 tasks
gabrielslach opened this issue Mar 31, 2020 · 23 comments
Open
1 of 2 tasks

react-native new-module #68

gabrielslach opened this issue Mar 31, 2020 · 23 comments

Comments

@gabrielslach
Copy link

gabrielslach commented Mar 31, 2020

Dev setup:

  • react-native-create-bridge version:
  • react-native version:

I am using create-bridge in a:

  • standalone library
  • existing React Native project

What you did:

after installing this with yarn, I tried to execute the command: react-native new-module, but the command is nonexistent.

What happened:

@SafdarSikander
Copy link

Same here

@jonathanmachado
Copy link

same here

1 similar comment
@yurui-viatick
Copy link

same here

@olkunmustafa
Copy link

Same here

@nguyenvantrai2011
Copy link

Any solution here?

@sarthur1-0
Copy link

same here

@martan-fitsense
Copy link

same

@mela1989
Copy link

any answer about this issue?

@numandev1
Copy link

make react-native project by react-native init projectname. then you can run this command at the root of new project

@YashYash
Copy link

Same here

@kafkas
Copy link

kafkas commented Oct 24, 2020

Same here

Follow up:
I had installed react-native-create-bridge globally. I re-installed locally and it works now

@fryercorp
Copy link

Has anyone managed to get around this? I've tried all of the suggestions I've found whilst googling but all I get is:

$ react-native new-module
error Unrecognized command "new-module".

@kafkas
Copy link

kafkas commented Oct 26, 2020

@fryercorp Did you install react-native-create-bridge locally?

@fryercorp
Copy link

fryercorp commented Oct 26, 2020

@fryercorp Did you install react-native-create-bridge locally?

I ran

npm install --save react-native-create-bridge

I can see the package in the node-modules directoy associated with my project.

I'm not sure if I'm missing any other dependencies.

@thangvo406
Copy link

same here. Any solution?

@praveens96
Copy link

same issue

@gufengpiaoyi
Copy link

same here

@novseje
Copy link

novseje commented Dec 11, 2020

It is a missing file in ./node_modules/.bin directory.
As I understand it, it should be a modified file ./node_modules/react-native-create-bridge/build/index.js named new-module.js
With

(async function main() {
  init();
}()).catch();

instead

module.exports = {
  name: "new-module",
  description: "bridges React Native modules & UI components",
  func: init
};

@daveteu
Copy link

daveteu commented Dec 23, 2020

last commit is about 3 years ago, i guess this project is as good as abandoned.

@markrickert
Copy link

I ran into this as well. Here's how I fixed it

  1. Apply @novseje's code change in ./node_modules/react-native-create-bridge/build/index.js so that the file will run when you call it (don't bother renaming it).
  2. run node ./node_modules/react-native-create-bridge/build/index.js
  3. It works!

@JJwilkin
Copy link

JJwilkin commented Mar 2, 2021

^^ @markrickert That worked for me, was able to run the command

@GhayoorUlHaq
Copy link

@markrickert It worked. Thanks!

ariccio added a commit to ariccio/COVID-CO2-tracker that referenced this issue May 25, 2022
@SurpriseMF3000
Copy link

SurpriseMF3000 commented Aug 8, 2022

Opposite for me.

I needed to change ./node_modules/react-native-create-bridge/build/index.js

module.exports = {
  name: "new-module",
  description: "bridges React Native modules & UI components",
  func: init
};

to

(async function main() {
  init();
}()).catch();

then run: node ./node_modules/react-native-create-bridge/build/index.js and it runs 👍

react-native new-module still doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests