Skip to content

Scoped Packages - "yarn add" (not "yarn") throws error #5263

@mblandfo

Description

@mblandfo

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

What is the current behavior?

Yarn add command cannot install this published package: https://www.npmjs.com/package/@google-cloud/translate

$ yarn add @google-cloud/translate
yarn add v1.3.2
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@google-cloud/
translate: Not found".

npm can install it correctly:

$npm install @google-cloud/translate --save

"yarn" does install it correctly if it is in the package.json, it is just "yarn add" that fails.

Interestingly, bluebird gives a slightly different error:

$ yarn add @types/bluebird
yarn add v1.3.2
[1/4] Resolving packages...
error Couldn't find package "@types\\bluebird" on the "npm" registry.

Both work from package.json, and wrapping them in quotes in yarn add doesn't matter.

Please mention your node.js, yarn and operating system version.
yarn 1.3.2
node v8.9.4
Windows 7

Related: #4354 #4366

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions