react-native-create-bridge icon indicating copy to clipboard operation
react-native-create-bridge copied to clipboard

react-native new-module

Open gabrielslach opened this issue 5 years ago • 23 comments

Dev setup:

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

I am using create-bridge in a:

  • [ ] standalone library
  • [x] 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:

gabrielslach avatar Mar 31 '20 11:03 gabrielslach

Same here

SafdarSikander avatar Apr 03 '20 07:04 SafdarSikander

same here

jonathanmachado avatar Apr 25 '20 21:04 jonathanmachado

same here

yurui-viatick avatar May 12 '20 05:05 yurui-viatick

Same here

olkunmustafa avatar May 13 '20 22:05 olkunmustafa

Any solution here?

nguyenvantrai2011 avatar May 23 '20 14:05 nguyenvantrai2011

same here

sarthur1-0 avatar Jun 22 '20 16:06 sarthur1-0

same

martan-fitsense avatar Jul 01 '20 09:07 martan-fitsense

any answer about this issue?

mela1989 avatar Jul 28 '20 11:07 mela1989

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

numandev1 avatar Jul 28 '20 11:07 numandev1

Same here

YashYash avatar Sep 26 '20 00:09 YashYash

Same here

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

kafkas avatar Oct 24 '20 19:10 kafkas

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".

fryercorp avatar Oct 26 '20 10:10 fryercorp

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

kafkas avatar Oct 26 '20 10:10 kafkas

@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.

fryercorp avatar Oct 26 '20 10:10 fryercorp

same here. Any solution?

thangvo406 avatar Nov 14 '20 14:11 thangvo406

same issue

praveens96 avatar Nov 26 '20 05:11 praveens96

same here

gufengpiaoyi avatar Dec 07 '20 01:12 gufengpiaoyi

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
};

novseje avatar Dec 11 '20 15:12 novseje

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

daveteu avatar Dec 23 '20 18:12 daveteu

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!

markrickert avatar Feb 14 '21 02:02 markrickert

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

JJwilkin avatar Mar 02 '21 00:03 JJwilkin

@markrickert It worked. Thanks!

GhayoorUlHaq avatar Apr 20 '21 13:04 GhayoorUlHaq

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

SurpriseMF3000 avatar Aug 08 '22 10:08 SurpriseMF3000