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

error An unexpected error occurred: "true/react: Invalid URI \"true/react\"" #7686

Closed
RamWebDev opened this issue Nov 12, 2019 · 2 comments
Closed

Comments

@RamWebDev
Copy link

While using create-react-app with YARN getting below mentioned issue
error An unexpected error occurred: "true/react: Invalid URI "true/react"".
info If you think this is a bug, please open a bug report with the information provided in "C:\01_MicroApp\01_TryOuts\options\03_release_candidate\packages\host-app\builder-ui-test-host\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

This is a BUG

Arguments:
C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js add --exact react react-dom react-scripts @types/node @types/react @types/react-dom @types/jest typescript --cwd C:\01_MicroApp\01_TryOuts\options\03_release_candidate\packages\host-app\builder-ui-test-host

PATH:
C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Microsoft MPI\Bin;C:\Program Files\Intel\iCLS Client;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\dotnet;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\PuTTY;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\1E\NomadBranch;C:\Program Files (x86)\Plantronics\Spokes3G;C:\ProgramData\chocolatey\bin;C:\curl-7.65.3\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Users\E455501\AppData\Local\Microsoft\WindowsApps;C:\Users\E455501\AppData\Local\Programs\Fiddler;C:\Program Files\Microsoft VS Code\bin;C:\Users\E455501\AppData\Roaming\npm;C:\Users\E455501\AppData\Local\Yarn\bin

Yarn version:
1.19.1

Node version:
12.13.0

Platform:
win32 x64

Trace:
Error: true/react: Invalid URI "true/react"
at Request.module.exports.Request.init (C:\Program Files (x86)\Yarn\lib\cli.js:140652:31)
at new Request (C:\Program Files (x86)\Yarn\lib\cli.js:140506:8)
at request (C:\Program Files (x86)\Yarn\lib\cli.js:137412:10)
at RequestManager.execute (C:\Program Files (x86)\Yarn\lib\cli.js:66087:15)
at RequestManager.shiftQueue (C:\Program Files (x86)\Yarn\lib\cli.js:66125:10)
at C:\Program Files (x86)\Yarn\lib\cli.js:65804:13
at new Promise ()
at new F (C:\Program Files (x86)\Yarn\lib\cli.js:5301:28)
at RequestManager.request (C:\Program Files (x86)\Yarn\lib\cli.js:65802:19)
at NpmRegistry. (C:\Program Files (x86)\Yarn\lib\cli.js:31704:42)

npm manifest:
{
"name": "builder-ui-test-host",
"version": "0.1.0",
"private": true
}

yarn manifest:
No manifest

Lockfile:
No lockfile

@theCalibrius
Copy link

theCalibrius commented Dec 5, 2019

@RamWebDev I had this same issue and I was able to fix it by running the following in terminal:

yarn config set registry https://registry.yarnpkg.com

I'm guessing that somehow your registry got changed to "true".
You can check this by going to wherever your global .yarnrc file is located and opening it.
My .yarnrc was located in my home directory on OSX, and it was showing my registry set to "true"

This may have happened as a result of switching to a private npm registry a while back and running yarn config set registry incorrectly, as mentioned here:

#4862 (comment)

@Serebiisme
Copy link

Check your ~/.yarnrc file on OSX

@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators Apr 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants