peggyrayzis / react-native-create-bridge

A CLI tool that bridges React Native modules & UI components with ease πŸŽ‰
MIT License
1.02k stars 64 forks source link

TypeError when running new-module #57

Open paul019 opened 5 years ago

paul019 commented 5 years ago

Dev setup:

I am using create-bridge in a:

What you did:

Pauls-MBP:pq-app-v2 Paul$ react-native new-module
Scanning folders for symlinks in /Users/Paul/Desktop/ExpoProjekte/pq-app-v2/node_modules (27ms)
? What is your bridge module called? TurnByTurn
? What type of bridge would you like to create? (Press <space> to select, <a> to
 toggle all, <i> to inverse selection)Native Module, Native UI Component
? What OS & languages would you like to support? Android/Java, iOS/Swift
? What directory should we deliver your JS files to? .
βœ– Oh no! πŸ’©  Something went wrong with creating your bridge module.
Please report any errors here: https://github.com/peggyrayzis/react-native-create-bridge/issues

Error: TypeError: Path must be a string. Received undefined

What happened:

See the error above. (Error: TypeError: Path must be a string. Received undefined)

anwzhang commented 5 years ago

Hi,

I did the same steps and also run into this TypeError, can anyone help?

linfan68 commented 5 years ago

Same here...

morenoh149 commented 5 years ago

Have you tried a path other than β€˜.’?

anwzhang commented 5 years ago

@morenoh149 Yes, I've tried other paths, still the same error.

morenoh149 commented 5 years ago

I just ran this

$ react-native new-module
? What is your bridge module called? ExampleBridge
? What type of bridge would you like to create? (Press <space> to select, <a> to toggle all, <i> to inverse selection)Native Module, Native UI Component
? What OS & languages would you like to support? (Press <space> to select, <a> to toggle all, <i> to inverse selection)Android/Java, iOS/Objective-C
? What directory should we deliver your JS files to? .
βœ” Your bridge module was successfully created! πŸŽ‰

I did not specify a project name (default). I chose to make a bridge for both types, Native module and native UI component. I chose android/java and ios/objective-c. I chose the current directory .. What options did you specify @anwzhang ?

I built a new react native app and ran the instructions in the readme https://github.com/morenoh149/reactNativeCreateBridgeTest