react-native-builder-bob icon indicating copy to clipboard operation
react-native-builder-bob copied to clipboard

Unable to create a libirary

Open CodeSyncr opened this issue 1 year ago • 12 comments

Description

(Use node --trace-deprecation ... to show where the warning was created) ✔ What is the name of the npm package? … react-native-test ✔ What is the description for the package? … hi ✔ What is the name of package author? … CodeSyncr ✔ What is the email address for the package author? … [email protected] ✔ What is the URL for the package author? … https://github.com/CodeSyncr ✔ What is the URL for the repository? … https://github.com/CodeSyncr/react-native-test ✔ What type of library do you want to develop? › Native module ✔ Which languages do you want to use? › Kotlin & Swift ✔ What type of example app do you want to create? › Vanilla ⠹ Generating example app

ENOENT: no such file or directory, open '/Users/yashkumar/Documents/Projects/react-native-test/example/package.json' node:internal/process/promises:391 triggerUncaughtException(err, true /* fromPromise */); ^

[Error: ENOENT: no such file or directory, open '/Users/yashkumar/Documents/Projects/react-native-test/example/package.json'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/Users/yashkumar/Documents/Projects/react-native-test/example/package.json' }

Node.js v22.3.0

Also to Mention library folder is completely empty

Packages

  • [X] create-react-native-library
  • [ ] react-native-builder-bob

Selected options

Native module Kotlin & Swift Vanilla

Link to repro

https://github.com/callstack/react-native-builder-bob

Environment

MAC OS - 14.5 (23F79) Node - 22.3.0

CodeSyncr avatar Aug 02 '24 04:08 CodeSyncr

I can't repro this. What command are you running?

satya164 avatar Aug 02 '24 10:08 satya164

Hi @satya164, i can reproduce this issue.

image

kadiraydinli avatar Aug 20 '24 20:08 kadiraydinli

@kadiraydinli looks like there is a regression due to the codegen specs PR. I think using a vanilla example app instead of the test app should work for you until we fix the issue

atlj avatar Aug 21 '24 09:08 atlj

@kadiraydinli looks like there is a regression due to the codegen specs PR. I think using a vanilla example app instead of the test app should work for you until we fix the issue

no tried with Vanilla app but same issue

CodeSyncr avatar Aug 21 '24 15:08 CodeSyncr

+1 on this issue. Generates well for "Native Modules", error on New Arch

gitstashapply avatar Aug 23 '24 12:08 gitstashapply

The issue happened for generating TurboModule new arch also in node 18 mac m1.

yongweilai avatar Sep 01 '24 08:09 yongweilai

Hey folks, we've landed 2 more fixes, could you try npx create-react-native-library@latest and create a new project again?

atlj avatar Sep 15 '24 17:09 atlj

Same issue, generating "Native View" on Intel i7, running Node v20.15.1

baldwinboy avatar Nov 30 '24 19:11 baldwinboy

This issue is still happening using Fabic View

santomegonzalo avatar Jan 09 '25 16:01 santomegonzalo

I just tested it with 0.43.0 and worked... every version after this one stopped working when selecting Fabric View. @satya164 do you have any idea whats going on? My node version is v22.11.0 and maybe you are using another version.

I tested every version from 0.43.0 onward and none of them worked

santomegonzalo avatar Jan 09 '25 17:01 santomegonzalo

No update on this library? is it being mantained or it is dead? until version 0.43.0 it was working fine... then stopped working

santomegonzalo avatar Jan 15 '25 10:01 santomegonzalo

I know that nobody is looking at this Issue at all, but to give some insights... I just cloned the entire repository and run it locally yarn watch and then packages/create-react-native-library/bin/create-react-native-library and this worked as expected (I did not tested the end result but at least no more error)

santomegonzalo avatar Jan 20 '25 14:01 santomegonzalo

This issue is still happening, I need using legacy native module with version 0.49.8, It seem`s not working fine!

John251314 avatar Sep 28 '25 10:09 John251314

Yeah, the binary works with node 20 & node 22

node node_modules/create-react-native-library/bin/create-react-native-library my-library 👌

Maybe npx combo breaks the executable ? i'm using macOs

NoRoboto avatar Oct 02 '25 18:10 NoRoboto