Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Template not installing with init command #21

Closed
Janjs opened this issue Dec 28, 2021 · 4 comments
Closed

Template not installing with init command #21

Janjs opened this issue Dec 28, 2021 · 4 comments
Assignees
Labels
💻 cli command line interface ❔ convert to faq Convert this issue into a FAQ item

Comments

@Janjs
Copy link

Janjs commented Dec 28, 2021

Version

v0.1.2

Problem Area

CLI

Steps to Reproduce

Following the tutorial, no errors on the setup, but when initializing a new project, the template doesn't get downloaded.

  1. npx torchlive-cli setup-dev
  2. npx torchlive-cli init MyFirstProject

error An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-pytorch-live: Not found".

Expected Results

I think it should download from "https://registry.yarnpkg.com/react-native-template-pytorch-live", not "https://registry.yarnpkg.com/react-native-template-react-native-template-pytorch-live". I don't know why it tries to install from that URL.

Code example, screenshot, or link to repository

No response

@raedle
Copy link
Contributor

raedle commented Dec 28, 2021

Hi @Janjs, thanks for reporting the issue!

  1. The npx (or npm) seems to be using the yarn registry. You can verify this by running the following command:
npm config get registry

which should log the default npm registry: https://registry.npmjs.org/.

  1. Try if the following works for you:
npm_config_registry=https://registry.npmjs.org npx torchlive-cli init MyFirstProject
  1. What are your versions for node, npm, and npx? (e.g., node --version)

@raedle raedle self-assigned this Dec 28, 2021
@raedle raedle added the 💻 cli command line interface label Dec 28, 2021
@Janjs
Copy link
Author

Janjs commented Dec 28, 2021

Hi @raedle thank you for the cool library and the quick response!

  1. I get https://registry.npmjs.org/ when running npm config get registry.
  2. Same a similar error, now with npm:
    error An unexpected error occurred: "https://registry.npmjs.org/react-native-template-react-native-template-pytorch-live: Not found".
  3. node v14.16.0, npm and npx 8.1.4

@raedle
Copy link
Contributor

raedle commented Dec 28, 2021

@Janjs, any chance react-native is installed globally?

  1. You can check it with
npm list -g react-native

which should be (empty) and log something like the following:

/Users/$USER/.nvm/versions/node/v14.18.1/lib
└── (empty)

You can check all globally installed packages with the following command:

npm list -g --depth=0

Also make sure to check the globally installed packages with yarn:

yarn global list

If react-native is installed globally, remove it and try again.

  1. If you tried the above and still get the error An unexpected error occurred: "https://registry.npmjs.org/react-native-template-react-native-template-pytorch-live: Not found", please try adding the --ignore-existing flag to force npx to ignore any locally installed versions of the CLI and use the latest.

@Janjs
Copy link
Author

Janjs commented Dec 28, 2021

Removing react-native-cli globally did the trick! Thank you @raedle.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 cli command line interface ❔ convert to faq Convert this issue into a FAQ item
Projects
None yet
Development

No branches or pull requests

2 participants