peggyrayzis / react-native-create-bridge

A CLI tool that bridges React Native modules & UI components with ease 🎉
MIT License
1.02k stars 63 forks source link

react-native new-module #68

Open gabrielslach opened 4 years ago

gabrielslach commented 4 years ago

Dev setup:

I am using create-bridge in a:

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 commented 4 years ago

Same here

jonathanmachado commented 4 years ago

same here

yurui-viatick commented 4 years ago

same here

olkunmustafa commented 4 years ago

Same here

nguyenvantrai2011 commented 4 years ago

Any solution here?

sarthur1-0 commented 4 years ago

same here

martan-fitsense commented 4 years ago

same

mela1989 commented 4 years ago

any answer about this issue?

numandev1 commented 4 years ago

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

YashYash commented 4 years ago

Same here

kafkas commented 4 years ago

Same here

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

fryercorp commented 4 years ago

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 commented 4 years ago

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

fryercorp commented 4 years ago

@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 commented 4 years ago

same here. Any solution?

praveens96 commented 3 years ago

same issue

gufengpiaoyi commented 3 years ago

same here

novseje commented 3 years ago

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 commented 3 years ago

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

markrickert commented 3 years ago

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 commented 3 years ago

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

GhayoorUlHaq commented 3 years ago

@markrickert It worked. Thanks!

SurpriseMF3000 commented 2 years ago

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