Yarn: npx create-react-app - "trouble with your network" "Couldn't find package Random pkg"

Created on 7 Apr 2018  Β·  3Comments  Β·  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
report

What is the current behavior?

npx create-react-app test
npx: 67 instalado em 5.184s

Creating a new React app in /Volumes/HSierra/Dev-2018/PWA/test.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.5.1
info No lockfile found.
[1/4] πŸ”  Resolving packages...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "Couldn't find package \"[email protected]\" required by \"html-minifier@^3.2.3\" on the \"npm\" registry.".
info If you think this is a bug, please open a bug report with the information provided in "/Volumes/HSierra/Dev-2018/PWA/test/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Couldn't find package "domelementtype@1" required by "htmlparser2@~3.3.0" on the "npm" registry.
(...)
Error: Couldn't find package "domelementtype@1" required by "[email protected]" on the "npm" registry.
(...)
Error: Couldn't find package "domelementtype@1" required by "[email protected]" on the "npm" registry.
(...)
Error: Couldn't find package "domelementtype@1" required by "[email protected]" on the "npm" registry.
(...)
Error: Couldn't find package "dom-serializer@0" required by "[email protected]" on the "npm" registry.
(...)
Error: Couldn't find package "wbuf@^1.7.2" required by "spdy-transport@^2.0.18" on the "npm" registry.
(...)
Error: Couldn't find package "wbuf@^1.1.0" required by "hpack.js@^2.1.6" on the "npm" registry.
(...)
Aborting installation.
  yarnpkg add --exact react react-dom react-scripts --cwd /Volumes/HSierra/Dev-2018/PWA/test has failed.

Deleting generated file... package.json
Deleting generated file... yarn-error.log
Deleting test / from /Volumes/HSierra/Dev-2018/PWA/
Done.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Exec create-react-app

Please mention your node.js, yarn and operating system version.

Yarn version: 
  1.5.1

Node version: 
  9.3.0

Platform: 
  darwin x64

npm manifest: 
  No manifest

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Trace: 
  Error: Couldn't find package "[email protected]" required by "babel-preset-react-app@^3.1.1" on the "npm" registry.
      at new MessageError (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:186:110)
      at PackageRequest.<anonymous> (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:36274:17)
      at Generator.throw (<anonymous>)
      at step (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:98:30)
      at /usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:111:13
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:160:7)

Can be related https://github.com/yarnpkg/yarn/issues/5259

triaged

Most helpful comment

Using npx create-react-app test --use-npm works fine - But should I Have Support on Yarn?

All 3 comments

Using npx create-react-app test --use-npm works fine - But should I Have Support on Yarn?

the same commend worked fine for me with yarn:

~/Projects/yarn-test πŸ’   npx create-react-app test
npx: installed 67 in 3.946s

Creating a new React app in /Users/jvalore/Projects/yarn-test/test.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.5.1
info No lockfile found.
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 764 new dependencies.
info Direct dependencies
β”œβ”€ [email protected]
β”œβ”€ [email protected]
└─ [email protected]
info All dependencies
{...full package list omitted for brevity...}
✨  Done in 16.03s.

Success! Created test at /Users/jvalore/Projects/yarn-test/test
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd test
  yarn start

Happy hacking!

I did some voodoo trick and works fine now https://github.com/yarnpkg/yarn/issues/5259#issuecomment-379769451

Was this page helpful?
0 / 5 - 0 ratings