`rnv new` fails with exit code 1 on yarn add
TSienki opened this issue Β· comments
Describe the bug
rnv new
command doesn't work.
It fails with the following error Error: Command failed with exit code 1: yarn add @rnv/template-starter@1.0.0-rc.18 --dev
To Reproduce
Steps to reproduce the behavior:
- Run command 'rnv new'
- See error
(.venv) β testRNV rnv new
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β βββββββ ββββββββββββ βββ ββββββ βββββββββββββββ βββββββββββ β
β βββββββββββββββββββββ ββββββββββββββββββββββββββ βββββββββββ β
β ββββββββββββββ ββββββ βββββββββββ βββ ββββββ βββββββββ β
β ββββββββββββββ ββββββββββββββββββ βββ βββββββ ββββββββββ β
β βββ ββββββββββββββ βββββββββ βββ βββ βββ βββββββ ββββββββ β
β βββ ββββββββββββββ ββββββββ βββ βββ βββ βββββ ββββββββ β
β π v:1.0.0-rc.18 | renative.org | 03/05/2024, 16:21:33 β
β $ rnv new β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
info: Current engine: @rnv/engine-core (/usr/local/lib/node_modules/rnv/node_modules/@rnv/engine-core/lib)
task: β new βΊ1
? What's your project Name? (folder will be created) hello-renative
warn: Folder ./hello-renative already exists. RNV will override it.
? Continue? Yes
info: Cleaning up existing folder...
warn: You are in ReNative project. Found: ./hello-renative/renative.json
? Are you sure you want to continue? Yes
? What workspace to use? rnv
? What template to use? @rnv/template-starter - Multiplatform 'hello world' template
β Executing: npm view @rnv/template-starter versions
β Executing: npm dist-tag ls @rnv/template-starter
? What @rnv/template-starter version to use? 1.0.0-rc.18 (@next)
β FAILED: yarn add @rnv/template-starter@1.0.0-rc.18 --dev
error: β¨― COMMAND:
yarn add @rnv/template-starter@1.0.0-rc.18 --dev
FAILED with ERROR:
Error: Command failed with exit code 1: yarn add @rnv/template-starter@1.0.0-rc.18 --dev
at makeError (/usr/local/lib/node_modules/rnv/node_modules/execa/lib/error.js:60:11)
at handlePromise (/usr/local/lib/node_modules/rnv/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β¨― SUMMARY | 03/05/2024, 16:21:50 | rnv@1.0.0-rc.18 β
β $ rnv new β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Engine: @rnv/engine-core β
β Build Scheme (-s): debug β
β Env Info: linux | x64 | node v18.20.2 β
β Executed Time: 0h:0m:16s:772ms β
β warn: Folder ./hello-renative already exists. RNV will override it.
β warn: You are in ReNative project. Found: ./hello-renative/renative.json
β error: β¨― COMMAND:
yarn add @rnv/template-starter@1.0.0-rc.18 --dev
FAILED with ERROR:
Error: Command failed with exit code 1: yarn add @rnv/template-starter@1.0.0-rc.18 --dev
at makeError (/usr/local/lib/node_modules/rnv/node_modules/execa/lib/error.js:60:11)
at handlePromise (/usr/local/lib/node_modules/rnv/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Expected behavior
A new project creation
Desktop:
- OS: Ubuntu 22.04.4 LTS
- Node Version: v18.20.2
- RNV Version: npm install rnv@1.0.0-rc.18
Facing Similar issue on my macOs Ventura. it was working perfectly previously
@paulNIP could you provide a proper error message? Is it exactly the same? Also your rnv, os, node versions?
@TSienki thanks for reporting this issue. I'm getting the same error on Ubuntu 20.04.5, Node v.18.20.2, RNV 1.0.0-rc.18
NOTE: if I used Node v.18.19.0 -> no error, project created successfully ->
~/Desktop/qa$ rnv new
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β βββββββ ββββββββββββ βββ ββββββ βββββββββββββββ βββββββββββ β
β βββββββββββββββββββββ ββββββββββββββββββββββββββ βββββββββββ β
β ββββββββββββββ ββββββ βββββββββββ βββ ββββββ βββββββββ β
β ββββββββββββββ ββββββββββββββββββ βββ βββββββ ββββββββββ β
β βββ ββββββββββββββ βββββββββ βββ βββ βββ βββββββ ββββββββ β
β βββ ββββββββββββββ ββββββββ βββ βββ βββ βββββ ββββββββ β
β π v:1.0.0-rc.18 | [renative.org](http://renative.org/) | 5/10/2024, 1:20:40 PM β
β $ rnv new β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
info: Current engine: @rnv/engine-core (../../.nvm/versions/node/v18.19.0/lib/node_modules/rnv/node_modules/@rnv/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 - Multiplatform 'hello world' template
β Executing: npm view @rnv/template-starter versions
β Executing: npm dist-tag ls @rnv/template-starter
? What @rnv/template-starter version to use? 1.0.0-rc.18 (@next)
β Executing: yarn add @rnv/template-starter@1.0.0-rc.18 --dev
β Executing: yarn add @rnv/config-templates@1.0.0-rc.18 --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 TEMPATE...DONE
info: Missing directory ./hello-renative/src/app.js. COPYING from TEMPATE...DONE
info: Missing directory ./hello-renative/src/entry.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/src/config.tsx.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/index.js.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/tsconfig.json.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/babel.config.js.js. COPYING from TEMPATE...DONE
info: Missing directory ./hello-renative/typings.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/.gitignore.js. COPYING from TEMPATE...DONE
info: Missing directory ./hello-renative/appConfigs/app.js. COPYING from TEMPATE...DONE
info: Missing directory ./hello-renative/appConfigs/base/assets.js. COPYING from TEMPATE...DONE
info: Missing directory ./hello-renative/appConfigs/base/fonts.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/Gemfile.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/metro.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/react-native.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/next.config.js.js. COPYING from TEMPATE...DONE
info: Missing file ./hello-renative/next-env.d.ts.js. COPYING from TEMPATE...DONE
info: Missing directory ./hello-renative/src/pages.js. COPYING from TEMPATE...DONE
info: .rnv folder missing. CREATING...DONE
info: .rnv/schemas folder missing. CREATING...DONE
info: Updating appConfig app with title: My Renative App and id: com.mycompany.hellorenative
? Project is ready. Do you want to install all dependencies now? Yes
β Executing: yarn
task: β new
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β SUMMARY | 5/10/2024, 1:22:32 PM | rnv@1.0.0-rc.18 β
β $ rnv new β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Project: hello-renative@0.1.0 β
β Workspace: rnv β
β Engine: @rnv/engine-core β
β Template: @rnv/template-starter β
β Build Scheme (-s): debug β
β Env Info: linux | x64 | node v18.19.0 β
β Executed Time: 0h:1m:51s:343ms β
β
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): @rnv/template-starter@1.0.0-rc.18
Git Enabled (--gitEnabled): true
Enabled Platforms: web, ios, android
-------------------------
β Your project is ready! Run it with:
cd hello-renative
npx rnv run
β You are trying to run global rnv command in your current project.
β This might lead to unexpected behaviour.
β Run your rnv command with npx prefix:
β npx rnv new
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
@TSienki try to install yarn (npm i yarn -g
), it should fix this issue
Closing as answer has been provided, feel free to reopen if needed