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

Fix/resolve peer deps npm #1558

Merged
merged 9 commits into from
Jul 3, 2024
Merged

Fix/resolve peer deps npm #1558

merged 9 commits into from
Jul 3, 2024

Conversation

ElenaDiachenko
Copy link
Contributor

Description

  • when using NPM as package manager rnv run gets stuck in endless loop
  • fixed determining of the current package manager (scenario when the yarn command is present in PATH but the specific active version of nodejs doesn't have yarn installed)

Related issues

Npm releases

n/a

@pauliusguzas pauliusguzas self-requested a review May 23, 2024 08:29
Copy link
Collaborator

@pauliusguzas pauliusguzas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project is created successfully but can't run platform

pauliusguzas@MBP-de-Flexn renative % npm uninstall yarn -g

removed 1 package in 494ms
pauliusguzas@MBP-de-Flexn renative % yarn
zsh: command not found: yarn
pauliusguzas@MBP-de-Flexn renative % cd
pauliusguzas@MBP-de-Flexn ~ % cd Desktop
pauliusguzas@MBP-de-Flexn Desktop % rnv new

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ 🚀 v:1.0.0-rc.19 | renative.org | 5/23/2024, 11:20:34 AM        │
│ $ rnv new                                                       │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-core (./renative/renative/packages/engine-core/lib)
task: ○ new ↺1
? What's your project Name? (folder will be created) yarnas
? What workspace to use? rnv
? What template to use? @rnv/template-starter (local) - /Users/pauliusguzas/desktop/renative/renative/packages/template-starter
info: Found local template: @rnv/template-starter@1.0.0-rc.19
✔ Executing: npm install
✔ Executing: npm add @rnv/config-templates@1.0.0-rc.19 --dev
? How to create config renative.json? Extend template (cleaner, overridable)
? What's your project Title? My Renative App
? What's your App ID? com.mycompany.yarnas
? What's your project version? 0.1.0
? What platforms would you like to use? web, ios, android
? Do you want to set-up git in your new project? Yes
info: Your project does not have a git repo. Creating one...DONE
✔ Executing: git init
info: Missing directory ./yarnas/buildHooks.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/src/app.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/src/entry.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/src/config.tsx.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/index.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/tsconfig.json.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/babel.config.js.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/typings.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/.gitignore.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/appConfigs/app.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/appConfigs/base/assets.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/appConfigs/base/fonts.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/Gemfile.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/metro.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/react-native.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/next.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/next-env.d.ts.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/src/pages.js. COPYING from TEMPATE...DONE
info: .rnv/schemas folder missing. CREATING...DONE
info: Updating appConfig app with title: My Renative App and id: com.mycompany.yarnas
? Project is ready. Do you want to install all dependencies now? Yes
✔ Executing: npm install
? To avoid the issue with the resolving peer dependencies .npmrc file with content: "legacy-peer-deps=true" will be added to your
project Yes
task: ✔ new
┌─────────────────────────────────────────────────────────────────┐
│ ✔ SUMMARY | 5/23/2024, 11:27:41 AM | rnv@1.0.0-rc.19            │
│ $ rnv new                                                       │
├─────────────────────────────────────────────────────────────────┤
│ Project: yarnas@0.1.0                                           │
│ Workspace: rnv                                                  │
│ Engine: @rnv/engine-core                                        │
│ Template: @rnv/template-starter                                 │
│ Build Scheme (-s): debug                                        │
│ Env Info: darwin | x64 | node v18.17.0                          │
│ Executed Time: 0h:7m:6s:764ms                                   │
│
  Generated Project Summary:
  -------------------------
  Project Name (--projectName): yarnas
  Package name: yarnas
  Project Version (--appVersion): 0.1.0
  Workspace (--workspace): rnv
  App Title (--title): My Renative App
  App ID (--id): com.mycompany.yarnas
  Project Template (--template): ../desktop/renative/renative/packages/template-starter
  Git Enabled (--gitEnabled): true
  Enabled Platforms: web, ios, android
  -------------------------
  ✔ Your project is ready! Run it with:

  cd yarnas
  npx rnv run
└─────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn Desktop % cd yarnas
Unknown ruby interpreter version (do not know how to handle): >=2.6.10.
pauliusguzas@MBP-de-Flexn yarnas % rnv link

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ 🚀 v:1.0.0-rc.19 | renative.org | 5/23/2024, 11:27:48 AM        │
│ $ rnv link                                                      │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-core (../renative/renative/packages/engine-core/lib)
task: ○ link ↺1
info: Found following source packages:

./node_modules/@rnv/adapter (unlinked)
./node_modules/@rnv/cli (unlinked)
./node_modules/@rnv/config-templates (unlinked)
./node_modules/@rnv/core (unlinked)
./node_modules/@rnv/engine-core (unlinked)
./node_modules/@rnv/engine-lightning (unlinked)
./node_modules/@rnv/engine-rn (unlinked)
./node_modules/@rnv/engine-rn-electron (unlinked)
./node_modules/@rnv/engine-rn-next (unlinked)
./node_modules/@rnv/engine-rn-tvos (unlinked)
./node_modules/@rnv/engine-rn-web (unlinked)
./node_modules/@rnv/renative (unlinked)
./node_modules/@rnv/sdk-android (unlinked)
./node_modules/@rnv/sdk-apple (unlinked)
./node_modules/@rnv/sdk-kaios (unlinked)
./node_modules/@rnv/sdk-react-native (unlinked)
./node_modules/@rnv/sdk-telemetry (unlinked)
./node_modules/@rnv/sdk-tizen (unlinked)
./node_modules/@rnv/sdk-utils (unlinked)
./node_modules/@rnv/sdk-webos (unlinked)
./node_modules/@rnv/sdk-webpack (unlinked)
./node_modules/@rnv/template-starter (linked)

? Found following packages to link? @rnv/adapter, @rnv/cli, @rnv/config-templates, @rnv/core, @rnv/engine-core, @rnv/engine-lightn
ing, @rnv/engine-rn, @rnv/engine-rn-electron, @rnv/engine-rn-next, @rnv/engine-rn-tvos, @rnv/engine-rn-web, @rnv/sdk-android, @rnv
/sdk-apple, @rnv/sdk-kaios, @rnv/sdk-react-native, @rnv/sdk-telemetry, @rnv/sdk-tizen, @rnv/sdk-utils, @rnv/sdk-webos, @rnv/sdk-we
bpack, @rnv/template-starter
info: Linking packages...
info: ✔ @rnv/adapter (./node_modules/@rnv/adapter)
info: ✔ @rnv/cli (./node_modules/@rnv/cli)
info: ✔ @rnv/config-templates (./node_modules/@rnv/config-templates)
info: ✔ @rnv/core (./node_modules/@rnv/core)
info: ✔ @rnv/engine-core (./node_modules/@rnv/engine-core)
info: ✔ @rnv/engine-lightning (./node_modules/@rnv/engine-lightning)
info: ✔ @rnv/engine-rn (./node_modules/@rnv/engine-rn)
info: ✔ @rnv/engine-rn-electron (./node_modules/@rnv/engine-rn-electron)
info: ✔ @rnv/engine-rn-next (./node_modules/@rnv/engine-rn-next)
info: ✔ @rnv/engine-rn-tvos (./node_modules/@rnv/engine-rn-tvos)
info: ✔ @rnv/engine-rn-web (./node_modules/@rnv/engine-rn-web)
info: ✔ @rnv/sdk-android (./node_modules/@rnv/sdk-android)
info: ✔ @rnv/sdk-apple (./node_modules/@rnv/sdk-apple)
info: ✔ @rnv/sdk-kaios (./node_modules/@rnv/sdk-kaios)
info: ✔ @rnv/sdk-react-native (./node_modules/@rnv/sdk-react-native)
info: ✔ @rnv/sdk-telemetry (./node_modules/@rnv/sdk-telemetry)
info: ✔ @rnv/sdk-tizen (./node_modules/@rnv/sdk-tizen)
info: ✔ @rnv/sdk-utils (./node_modules/@rnv/sdk-utils)
info: ✔ @rnv/sdk-webos (./node_modules/@rnv/sdk-webos)
info: ✔ @rnv/sdk-webpack (./node_modules/@rnv/sdk-webpack)
info: @rnv/template-starter is already linked. SKIPPING
task: ✔ link
┌─────────────────────────────────────────────────────────────────┐
│ ✔ SUMMARY | 5/23/2024, 11:27:48 AM | rnv@1.0.0-rc.19            │
│ $ rnv link                                                      │
├─────────────────────────────────────────────────────────────────┤
│ Project: yarnas@0.1.0                                           │
│ Workspace: rnv                                                  │
│ Engine: @rnv/engine-core                                        │
│ Build Scheme (-s): debug                                        │
│ Env Info: darwin | x64 | node v18.17.0                          │
│ Executed Time: 0h:0m:0s:839ms                                   │
└─────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn yarnas %
pauliusguzas@MBP-de-Flexn yarnas % npx rnv run -p web

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ 🚀 v:1.0.0-rc.19 | renative.org | 5/23/2024, 11:28:04 AM        │
│ $ rnv run -p web                                                │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-rn-next (../renative/renative/packages/engine-rn-next)
task: ○ run ↺1
info: Build hooks not complied. BUILDING...
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
info: Creating folder ./platformBuilds ...DONE
task: ○ workspace configure ↺1
task: ✔ workspace configure
task: ○ app configure ↺1
info: Found only one app config available. Will use app
info: Current app config: app
task: ✔ app configure
info: Adding missing engine @rnv/engine-rn-next@1.0.0-rc.19 to package.json
info: Adding missing engine @rnv/engine-rn@1.0.0-rc.19 to package.json
info: ✔ /@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/overrides@11.3.7.json. FIXING...DONE
info: ✔ /@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
task: ✔ project configure
info: Current Build Scheme: debug
warn: ○ platform configure: Updates to package.json are required:
- react (N/A) => (18.2.0) Missing dependency | plugin (renative.json)
- react-art (N/A) => (18.2.0) Missing dependency | plugin (renative.json)
- react-dom (N/A) => (18.2.0) Missing dependency | plugin (renative.json)
- react-native (N/A) => (0.73.4) Missing dependency | plugin (renative.json)
- react-native-web (N/A) => (0.19.9) Missing dependency | plugin (renative.json)
- next (N/A) => (14.1.4) Missing dependency | plugin (renative.json)
- @rnv/renative (N/A) => (1.0.0-rc.19) Missing dependency | plugin (renative.json)
- react-native-gesture-handler (N/A) => (2.14.1) Missing dependency | plugin (renative.json)

? What to do? Update package and install (recommended)
✖ FAILED: npm install
warn: ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 1: npm install
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "from" argument must be of type string. Received undefined

npm ERR! A complete log of this run can be found in: ../../.npm/_logs/2024-05-23T08_28_06_813Z-debug-0.log
    at makeError (../renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (../renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


 Seems like your node_modules is corrupted by other libs. ReNative will try to fix it for you
✖ FAILED: npm install
error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T08_28_17_522Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T08_28_17_522Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T08_28_17_522Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


┌─────────────────────────────────────────────────────────────────┐
│ ⨯ SUMMARY | 5/23/2024, 11:28:24 AM | rnv@1.0.0-rc.19            │
│ $ rnv run -p web                                                │
├─────────────────────────────────────────────────────────────────┤
│ Project: yarnas@0.1.0                                           │
│ Workspace: rnv                                                  │
│ Platform (-p): web                                              │
│ Engine: @rnv/engine-rn-next                                     │
│ Template: @rnv/template-starter                                 │
│ App Config (-c): app                                            │
│ Build Scheme (-s): debug                                        │
│ Supported Platforms: web, ios, android                          │
│ Env Info: darwin | x64 | node v18.17.0                          │
│ Executed Time: 0h:0m:19s:101ms                                  │
│ info: ✔ /@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/overrides@11.3.7.json. FIXING...DONE
│ info: ✔ /@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
│ info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
│ warn: ○ platform configure: Updates to package.json are required:
│ warn: ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 1: npm install
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "from" argument must be of type string. Received undefined

npm ERR! A complete log of this run can be found in: ../../.npm/_logs/2024-05-23T08_28_06_813Z-debug-0.log
    at makeError (../renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (../renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


 Seems like your node_modules is corrupted by other libs. ReNative will try to fix it for you
│ error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T08_28_17_522Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


└─────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn yarnas %

@pauliusguzas pauliusguzas added e2e and removed e2e labels May 23, 2024
@ElenaDiachenko
Copy link
Contributor Author

@pauliusguzas You don’t need to do rnv link. Just run

@pauliusguzas pauliusguzas self-requested a review May 23, 2024 09:14
Copy link
Collaborator

@pauliusguzas pauliusguzas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue

pauliusguzas@MBP-de-Flexn Desktop % npm uninstall yarn -g

removed 1 package in 486ms
pauliusguzas@MBP-de-Flexn Desktop % rnv new

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ 🚀 v:1.0.0-rc.19 | renative.org | 5/23/2024, 12:07:24 PM        │
│ $ rnv new                                                       │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-core (./renative/renative/packages/engine-core/lib)
task: ○ new ↺1
? What's your project Name? (folder will be created) yarnas
warn:  Folder ./yarnas already exists. RNV will override it.
? Continue? Yes
info: Cleaning up existing folder...
? What workspace to use? rnv
? What template to use? @rnv/template-starter (local) - /Users/pauliusguzas/desktop/renative/renative/packages/template-starter
info: Found local template: @rnv/template-starter@1.0.0-rc.19
✔ Executing: npm install
✔ Executing: npm add @rnv/config-templates@1.0.0-rc.19 --dev
? How to create config renative.json? Extend template (cleaner, overridable)
? What's your project Title? My Renative App
? What's your App ID? com.mycompany.yarnas
? What's your project version? 0.1.0
? What platforms would you like to use? web, ios, android
? Do you want to set-up git in your new project? Yes
info: Your project does not have a git repo. Creating one...DONE
✔ Executing: git init
info: Missing directory ./yarnas/buildHooks.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/src/app.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/src/entry.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/src/config.tsx.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/index.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/tsconfig.json.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/babel.config.js.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/typings.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/.gitignore.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/appConfigs/app.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/appConfigs/base/assets.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/appConfigs/base/fonts.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/Gemfile.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/metro.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/react-native.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/next.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./yarnas/next-env.d.ts.js. COPYING from TEMPATE...DONE
info: Missing directory ./yarnas/src/pages.js. COPYING from TEMPATE...DONE
info: .rnv/schemas folder missing. CREATING...DONE
info: Updating appConfig app with title: My Renative App and id: com.mycompany.yarnas
? Project is ready. Do you want to install all dependencies now? Yes
✔ Executing: npm install
? To avoid the issue with the resolving peer dependencies .npmrc file with content: "legacy-peer-deps=true" will be added to your
project Yes
task: ✔ new
┌─────────────────────────────────────────────────────────────────┐
│ ⚠ SUMMARY | 5/23/2024, 12:14:06 PM | rnv@1.0.0-rc.19            │
│ $ rnv new                                                       │
├─────────────────────────────────────────────────────────────────┤
│ Project: yarnas@0.1.0                                           │
│ Workspace: rnv                                                  │
│ Engine: @rnv/engine-core                                        │
│ Template: @rnv/template-starter                                 │
│ Build Scheme (-s): debug                                        │
│ Env Info: darwin | x64 | node v18.17.0                          │
│ Executed Time: 0h:6m:41s:555ms                                  │
│ warn:  Folder ./yarnas already exists. RNV will override it.
│
  Generated Project Summary:
  -------------------------
  Project Name (--projectName): yarnas
  Package name: yarnas
  Project Version (--appVersion): 0.1.0
  Workspace (--workspace): rnv
  App Title (--title): My Renative App
  App ID (--id): com.mycompany.yarnas
  Project Template (--template): ../desktop/renative/renative/packages/template-starter
  Git Enabled (--gitEnabled): true
  Enabled Platforms: web, ios, android
  -------------------------
  ✔ Your project is ready! Run it with:

  cd yarnas
  npx rnv run
└─────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn Desktop % cd yarnas
Unknown ruby interpreter version (do not know how to handle): >=2.6.10.
pauliusguzas@MBP-de-Flexn yarnas % npx rnv run -p web

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ $ npx rnv run -p web                                            │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-rn-next (./node_modules/@rnv/engine-rn-next)
task: ○ run ↺1
info: Build hooks not complied. BUILDING...
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
info: Creating folder ./platformBuilds ...DONE
task: ○ workspace configure ↺1
task: ✔ workspace configure
task: ○ app configure ↺1
info: Found only one app config available. Will use app
info: Current app config: app
task: ✔ app configure
info: Adding missing engine @rnv/engine-rn-next@1.0.0-rc.19 to package.json
info: Adding missing engine @rnv/engine-rn@1.0.0-rc.19 to package.json
info: ✔ /@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/overrides@11.3.7.json. FIXING...DONE
info: ✔ /@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
task: ✔ project configure
info: Current Build Scheme: debug
warn: ○ platform configure: Updates to package.json are required:
- react (N/A) => (18.2.0) Missing dependency | plugin (renative.json)
- react-art (N/A) => (18.2.0) Missing dependency | plugin (renative.json)
- react-dom (N/A) => (18.2.0) Missing dependency | plugin (renative.json)
- react-native (N/A) => (0.73.4) Missing dependency | plugin (renative.json)
- react-native-web (N/A) => (0.19.9) Missing dependency | plugin (renative.json)
- next (N/A) => (14.1.4) Missing dependency | plugin (renative.json)
- @rnv/renative (N/A) => (1.0.0-rc.19) Missing dependency | plugin (renative.json)
- react-native-gesture-handler (N/A) => (2.14.1) Missing dependency | plugin (renative.json)

? What to do? Update package and install (recommended)
✖ FAILED: npm install
warn: ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 1: npm install
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "from" argument must be of type string. Received undefined

npm ERR! A complete log of this run can be found in: ../../.npm/_logs/2024-05-23T09_14_19_245Z-debug-0.log
    at makeError (./node_modules/execa/lib/error.js:60:11)
    at handlePromise (./node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


 Seems like your node_modules is corrupted by other libs. ReNative will try to fix it for you
✖ FAILED: npm install
error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T09_14_33_333Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T09_14_33_333Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T09_14_33_333Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


┌─────────────────────────────────────────────────────────────────┐
│ ⨯ SUMMARY | 5/23/2024, 12:14:41 PM | rnv@                       │
│ $ npx rnv run -p web                                            │
├─────────────────────────────────────────────────────────────────┤
│ Project: yarnas@0.1.0                                           │
│ Workspace: rnv                                                  │
│ Platform (-p): web                                              │
│ Engine: @rnv/engine-rn-next                                     │
│ Template: @rnv/template-starter                                 │
│ App Config (-c): app                                            │
│ Build Scheme (-s): debug                                        │
│ Supported Platforms: web, ios, android                          │
│ Env Info: darwin | x64 | node v18.17.0                          │
│ Executed Time: 0h:0m:23s:856ms                                  │
│ info: ✔ /@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/overrides@11.3.7.json. FIXING...DONE
│ info: ✔ /@react-native-community/cli/build/bin.js requires override by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json. FIXING...DONE
│ info: ✔ /react-native-tvos/Libraries/Components/ScrollView/ScrollViewNativeComponent.js requires override by: /@rnv/config-templates/pluginTemplates/react-native-tvos/overrides.json. FIXING...DONE
│ warn: ○ platform configure: Updates to package.json are required:
│ warn: ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 1: npm install
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "from" argument must be of type string. Received undefined

npm ERR! A complete log of this run can be found in: ../../.npm/_logs/2024-05-23T09_14_19_245Z-debug-0.log
    at makeError (./node_modules/execa/lib/error.js:60:11)
    at handlePromise (./node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


 Seems like your node_modules is corrupted by other libs. ReNative will try to fix it for you
│ error: ⨯ ○ platform configure: COMMAND:

npm install

FAILED with ERROR:

Error: Command failed with exit code 190: npm install
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web
npm ERR! dest /Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/pauliusguzas/Desktop/yarnas/node_modules/react-native-web' -> '/Users/pauliusguzas/Desktop/yarnas/node_modules/.react-native-web-RzdzjCSe'

npm ERR! A complete log of this run can be found in: /Users/pauliusguzas/.npm/_logs/2024-05-23T09_14_33_333Z-debug-0.log
    at makeError (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/yarnas/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


└─────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn yarnas %

@locksten locksten self-requested a review June 5, 2024 07:17
@locksten
Copy link
Collaborator

locksten commented Jun 5, 2024

I modified isYarnInstalled() to always return false (just adding --packageManager npm doesn't work but that's a separate issue) and got the same error (with npm v10.2.3).
Seems to be a common issue with npm.

@pavjacko pavjacko added this to the 1.0 milestone Jul 1, 2024
@GabrieleKaceviciute
Copy link
Collaborator

  1. rnv new ->
➜  nauji rnv new

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ 🚀 v:1.0.0-rc.19 | renative.org | 7/3/2024, 9:05:15 AM          │
│ $ rnv new                                                       │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-core (../tests/renative/packages/engine-core/lib)
task: ○ new ↺1
? What's your project Name? (folder will be created) hello-renative
? What workspace to use? rnv
? What template to use? @rnv/template-starter (local) - /Users/gabriele/Desktop/tests/renative/packages/template-starter
info: Found local template: @rnv/template-starter@1.0.0-rc.19
✔ Executing: npm install
✔ Executing: npm add @rnv/config-templates@1.0.0-rc.19 --dev
? How to create config renative.json? Extend template (cleaner, overridable)
? What's your project Title? My Renative App
? What's your App ID? com.mycompany.hellorenative
? What's your project version? 0.1.0
? What platforms would you like to use? web, ios, android
? Do you want to set-up git in your new project? Yes
info: Your project does not have a git repo. Creating one...DONE
✔ Executing: git init
info: Missing directory ./hello-renative/buildHooks.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/src/app.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/src/entry.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/src/config.tsx.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/index.js.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/tsconfig.json.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/babel.config.js.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/typings.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/.gitignore.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/appConfigs/app.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/appConfigs/base/assets.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/appConfigs/base/fonts.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/Gemfile.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/metro.config.js.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/react-native.config.js.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/next.config.js.js. COPYING from TEMPLATE...DONE
info: Missing file ./hello-renative/next-env.d.ts.js. COPYING from TEMPLATE...DONE
info: Missing directory ./hello-renative/src/pages.js. COPYING from TEMPLATE...DONE
info: .rnv/schemas folder missing. CREATING...DONE
info: Updating appConfig app with title: My Renative App and id: com.mycompany.hellorenative
? To avoid the issue with the resolving peer dependencies .npmrc file with content: "legacy-peer-deps=true" will be added to your project Yes
? You do not have any engines installed. Do you want to install them now? Yes
⠼ Executing: npm add @rnv/engine-rn-next@1.0.0-rc.19 --dev
✔ Executing: npm add @rnv/engine-rn-next@1.0.0-rc.19 --dev
✔ Executing: npm add @rnv/engine-rn@1.0.0-rc.19 --dev
? Project is ready. Do you want to install all dependencies now? Yes
✔ Executing: npm install
task: ✔ new
┌─────────────────────────────────────────────────────────────────┐
│ ✔ SUMMARY | 7/3/2024, 9:08:19 AM | rnv@1.0.0-rc.19              │
│ $ rnv new                                                       │
├─────────────────────────────────────────────────────────────────┤
│ Project: hello-renative@0.1.0                                   │
│ Workspace: rnv                                                  │
│ Engine: @rnv/engine-core                                        │
│ Template: @rnv/template-starter                                 │
│ Build Scheme (-s): debug                                        │
│ Env Info: darwin | arm64 | node v18.19.0                        │
│ Executed Time: 0h:3m:3s:871ms                                   │
│
  Generated Project Summary:
  -------------------------
  Project Name (--projectName): hello-renative
  Package name: hello-renative
  Project Version (--appVersion): 0.1.0
  Workspace (--workspace): rnv
  App Title (--title): My Renative App
  App ID (--id): com.mycompany.hellorenative
  Project Template (--template): ../tests/renative/packages/template-starter
  Git Enabled (--gitEnabled): true
  Enabled Platforms: web, ios, android
  -------------------------
  ✔ Your project is ready! Run it with:

  cd hello-renative
  npx rnv run
└─────────────────────────────────────────────────────────────────┘
  1. npx rnv run -p web -> pass
  2. npx rnv run -p android ->
➜  hello-renative git:(master) ✗ npx rnv run -p android

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ $ npx rnv run -p android                                        │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-rn (./node_modules/@rnv/engine-rn)
task: ○ run ↺1
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
task: ○ workspace configure ↺1
task: ✔ workspace configure
task: ○ app configure ↺1
info: Current app config: app
task: ✔ app configure
info: ./node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/overrides@11.3.7.json
info: ./node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
task: ✔ project configure
info: Current Build Scheme: debug
task: ○ sdk configure ↺1
task: ✔ sdk configure
task: ✔ platform configure
info: Found custom assetSources at ./node_modules/@flexn/assets-renative-outline/assets/android. Will be used to generate assets.
✔ Executing: npx jetify
task: ✔ configure
✔ Executing: /Users/gabriele/Library/Android/sdk/platform-tools/adb devices -l
✔ Executing: /Users/gabriele/Library/Android/sdk/emulator/emulator -list-avds
✔ Executing: /Users/gabriele/Library/Android/sdk/platform-tools/adb devices -l
✔ Waiting for emulator to boot...
✔ Executing: /Users/gabriele/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell wm size
✔ Executing: /Users/gabriele/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell wm density
✔ Executing: /Users/gabriele/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop
info: ✔ Found active emulator! emulator-5554. Will use it
task: ○ start ↺1
task: ○ configureSoft ↺1
task: ○ app configure ↺2
info: Current app config: app
task: ✔ app configure
info: Current Build Scheme: debug
task: ○ sdk configure ↺2
task: ✔ sdk configure
task: ✔ configureSoft

Dev server running at: http://0.0.0.0:8083/index.bundle?platform=android

task: ✔ start
⠇ Waiting for bundler to finish...warn =================================================================================================
warn From React Native 0.73, your project's Metro config should extend '@react-native/metro-config'
warn or it will fail to build. Please copy the template at:
warn https://github.com/facebook/react-native/blob/main/packages/react-native/template/metro.config.js
warn This warning will be removed in future (https://github.com/facebook/metro/issues/1018).
warn =================================================================================================
info Welcome to React Native v0.73
info Starting dev server on port 8083...

                        ▒▒▓▓▓▓▒▒
                     ▒▓▓▓▒▒░░▒▒▓▓▓▒
                  ▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
                 ▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
                 ▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
                 ▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓
                 ▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓
                  ▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒
                     ▒▓▓▓▒░░░░▒▓▓▓▒
                        ▒▒▓▓▓▓▒▒


                Welcome to Metro v0.80.9
              Fast - Scalable - Integrated


⠙ Waiting for bundler to finish...info React Native v0.74.3 is now available (your project is running on v0.73.4).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.74.3
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.3
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
✔ Waiting for bundler to finish...

  WARNING: You should run npx react-native@latest to ensure you're always using the most current version of the CLI. NPX has cached version (0.73.4) != current release (0.74.3)

info Building the app...
:ReactNative:Unexpected empty result of running '[node, /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js, config]' command.
:ReactNative:Running '[node, /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js, config]' command failed.

FAILURE: Build failed with an exception.

* Where:
Script '/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 391

* What went wrong:
A problem occurred evaluating script.
> node:internal/modules/cjs/loader:1137  throw err;  ^Error: Cannot find module 'dotenv'Require stack:- /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)    at Module._load (node:internal/modules/cjs/loader:975:27)    at Module.require (node:internal/modules/cjs/loader:1225:19)    at require (node:internal/modules/helpers:177:18)    at Object.<anonymous> (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js:4:55)    at Module._compile (node:internal/modules/cjs/loader:1356:14)    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)    at Module.load (node:internal/modules/cjs/loader:1197:32)    at Module._load (node:internal/modules/cjs/loader:1013:12)    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {  code: 'MODULE_NOT_FOUND',  requireStack: [    '/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js'  ]}Node.js v18.19.0

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 695ms

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

error Failed to build the app.
Error: Command failed with exit code 1: ./gradlew app:installDebug -x lint -PreactNativeDevServerPort=8083
    at makeError (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/lib/error.js:60:11)
    at Function.module.exports.sync (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/index.js:194:17)
    at build (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli-platform-android/build/commands/buildAndroid/index.js:68:22)
    at runOnSpecificDevice (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:221:33)
    at buildAndRun (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:183:12)
    at Object.runAndroid [as func] (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:116:10)
    at Command.handleAction (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/index.js:118:23)
    at Command.listener [as _actionHandler] (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:482:17)
    at /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1283:65
    at Command._chainOrCall (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1177:12)
    at Command._parseCommand (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1283:27)
    at /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1081:27
    at Command._chainOrCall (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1177:12)
    at Command._dispatchSubcommand (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1077:23)
    at Command._parseCommand (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:1248:19)
    at Command.parse (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/node_modules/commander/lib/command.js:909:10)
info Run CLI with --verbose flag for more details.
error: ⨯ ○ run: COMMAND:

node  /Users/gabriele/Desktop/nauji/hello-renative/node_modules/react-native/cli.js run-android --mode=Debug --no-packager --main-activity=SplashActivity --deviceId=emulator-5554

FAILED with ERROR:

Error: Command failed with exit code 1: node /Users/gabriele/Desktop/nauji/hello-renative/node_modules/react-native/cli.js run-android --mode=Debug --no-packager --main-activity=SplashActivity --deviceId=emulator-5554
    at makeError (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


┌─────────────────────────────────────────────────────────────────┐
│ ⨯ SUMMARY | 7/3/2024, 9:09:55 AM | rnv@                         │
│ $ npx rnv run -p android                                        │
├─────────────────────────────────────────────────────────────────┤
│ Project: hello-renative@0.1.0                                   │
│ Workspace: rnv                                                  │
│ Platform (-p): android                                          │
│ Engine: @rnv/engine-rn                                          │
│ Template: @rnv/template-starter                                 │
│ App Config (-c): app                                            │
│ Build Scheme (-s): debug                                        │
│ Target (-t): Pixel_7_API_30                                     │
│ Supported Platforms: web, ios, android                          │
│ Env Info: darwin | arm64 | node v18.19.0                        │
│ Executed Time: 0h:0m:17s:593ms                                  │
│ info: ✔ Found active emulator! emulator-5554. Will use it
│ error: ⨯ ○ run: COMMAND:

node  /Users/gabriele/Desktop/nauji/hello-renative/node_modules/react-native/cli.js run-android --mode=Debug --no-packager --main-activity=SplashActivity --deviceId=emulator-5554

FAILED with ERROR:

Error: Command failed with exit code 1: node /Users/gabriele/Desktop/nauji/hello-renative/node_modules/react-native/cli.js run-android --mode=Debug --no-packager --main-activity=SplashActivity --deviceId=emulator-5554
    at makeError (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


│ Project location: ./platformBuilds/app_android                  │
└─────────────────────────────────────────────────────────────────┘
error: ⨯ ○ run: COMMAND:

node /Users/gabriele/Desktop/nauji/hello-renative/node_modules/react-native/local-cli/cli.js start --port 8083 --no-interactive --config=metro.config.js

FAILED with ERROR:

Error: Command was killed with SIGTERM (Termination): node /Users/gabriele/Desktop/nauji/hello-renative/node_modules/react-native/local-cli/cli.js start --port 8083 --no-interactive --config=metro.config.js
    at makeError (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


➜  hello-renative git:(master) ✗
  1. npx rnv run -p ios ->
➜  hello-renative git:(master) ✗ npx rnv run -p ios

┌─────────────────────────────────────────────────────────────────┐
│ ██████╗ ███████╗███╗   ██╗ █████╗ ████████╗██╗██╗   ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗  ██║██╔══██╗╚══██╔══╝██║██║   ██║██╔════╝ │
│ ██████╔╝█████╗  ██╔██╗ ██║███████║   ██║   ██║██║   ██║█████╗   │
│ ██╔══██╗██╔══╝  ██║╚██╗██║██╔══██║   ██║   ██║╚██╗ ██╔╝██╔══╝   │
│ ██║  ██║███████╗██║ ╚████║██║  ██║   ██║   ██║ ╚████╔╝ ███████╗ │
│ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝ │
│ $ npx rnv run -p ios                                            │
└─────────────────────────────────────────────────────────────────┘
info: Current engine: @rnv/engine-rn (./node_modules/@rnv/engine-rn)
task: ○ run ↺1
task: ○ configure ↺1
task: ○ platform configure ↺1
task: ○ project configure ↺1
task: ○ workspace configure ↺1
task: ✔ workspace configure
task: ○ app configure ↺1
info: Current app config: app
task: ✔ app configure
info: ./node_modules/@react-native-community/cli-platform-ios/build/tools/listIOSDevices.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli-platform-ios/overrides@11.3.7.json
info: ./node_modules/@react-native-community/cli/build/bin.js overriden by: /@rnv/config-templates/pluginTemplates/@react-native-community/cli/overrides.json
task: ✔ project configure
info: Current Build Scheme: debug
task: ✔ platform configure
info: Found custom assetSources at ./node_modules/@flexn/assets-renative-outline/assets/ios. Will be used to generate assets.
info: Podfile.lock does not exist. Will execute pod actions...
✔ Executing: bundle install
✖ FAILED: bundle exec pod install
error: ⨯ ○ configure: COMMAND:

bundle exec pod install

FAILED with ERROR:

Error: Cannot find module 'dotenv'
Require stack:
- /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js
 at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
 at Module._load (node:internal/modules/cjs/loader:975:27)
 at Module.require (node:internal/modules/cjs/loader:1225:19)
[!] Invalid `Podfile` file: unexpected token at ''.
 # from /Users/gabriele/Desktop/nauji/hello-renative/platformBuilds/app_ios/Podfile:38
 # -------------------------------------------
 # target 'RNVApp' do
 > config = use_native_modules!
 #

Error: Command failed with exit code 1: bundle exec pod install
node:internal/modules/cjs/loader:1137
  throw err;
  ^

Error: Cannot find module 'dotenv'
Require stack:
- /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js:4:55)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js'
  ]
}

Node.js v18.19.0

[!] Invalid `Podfile` file: unexpected token at ''.

 #  from /Users/gabriele/Desktop/nauji/hello-renative/platformBuilds/app_ios/Podfile:38
 #  -------------------------------------------
 #  target 'RNVApp' do
 >    config = use_native_modules!
 #
 #  -------------------------------------------
    at makeError (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


┌─────────────────────────────────────────────────────────────────┐
│ ⨯ SUMMARY | 7/3/2024, 9:12:16 AM | rnv@                         │
│ $ npx rnv run -p ios                                            │
├─────────────────────────────────────────────────────────────────┤
│ Project: hello-renative@0.1.0                                   │
│ Workspace: rnv                                                  │
│ Platform (-p): ios                                              │
│ Engine: @rnv/engine-rn                                          │
│ Template: @rnv/template-starter                                 │
│ App Config (-c): app                                            │
│ Build Scheme (-s): debug                                        │
│ Target (-t): iPhone 15                                          │
│ Supported Platforms: web, ios, android                          │
│ Env Info: darwin | arm64 | node v18.19.0                        │
│ Executed Time: 0h:0m:2s:62ms                                    │
│ error: ⨯ ○ configure: COMMAND:

bundle exec pod install

FAILED with ERROR:

Error: Cannot find module 'dotenv'
Require stack:
- /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js
 at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
 at Module._load (node:internal/modules/cjs/loader:975:27)
 at Module.require (node:internal/modules/cjs/loader:1225:19)
[!] Invalid `Podfile` file: unexpected token at ''.
 # from /Users/gabriele/Desktop/nauji/hello-renative/platformBuilds/app_ios/Podfile:38
 # -------------------------------------------
 # target 'RNVApp' do
 > config = use_native_modules!
 #

Error: Command failed with exit code 1: bundle exec pod install
node:internal/modules/cjs/loader:1137
  throw err;
  ^

Error: Cannot find module 'dotenv'
Require stack:
- /Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js:4:55)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/gabriele/Desktop/nauji/hello-renative/node_modules/@react-native-community/cli/build/bin.js'
  ]
}

Node.js v18.19.0

[!] Invalid `Podfile` file: unexpected token at ''.

 #  from /Users/gabriele/Desktop/nauji/hello-renative/platformBuilds/app_ios/Podfile:38
 #  -------------------------------------------
 #  target 'RNVApp' do
 >    config = use_native_modules!
 #
 #  -------------------------------------------
    at makeError (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/gabriele/Desktop/nauji/hello-renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


│ Project location: ./platformBuilds/app_ios/RNVApp.xcworkspace   │
└─────────────────────────────────────────────────────────────────┘
➜  hello-renative git:(master) ✗

I've tested on macOS Ventura 13.6.4 (M2)

➜  hello-renative git:(master) ✗ yarn -v
zsh: command not found: yarn
➜  hello-renative git:(master) ✗ node -v
v18.19.0
➜  hello-renative git:(master) ✗ npm -v
10.2.3
➜  hello-renative git:(master) ✗

@GabrieleKaceviciute GabrieleKaceviciute self-requested a review July 3, 2024 07:42
@pavjacko pavjacko merged commit b81904b into release/1.0 Jul 3, 2024
1 check passed
@pavjacko pavjacko deleted the fix/resolve_peerDeps_npm branch July 3, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants