Sitelet https://github.com/yarnpkg/yarn/issues/6948
Skip to content

yarn ignores the "cpu" param in package.json when "engines" is missing #6948

Description

@gabor

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

What is the current behavior?
yarn ignores the cpu setting in package.json when the engines section does not exist in package.json.

If the current behavior is a bug, please provide the steps to reproduce.
make sure your node's process.arch is not ia32. for example, use a 64bit node on 64bit windows.
in an empty directory, save this as package.json:

{
  "cpu": ["ia32"]
}

now run yarn install. it will finish without showing any errors. this is the bug.
(you can try npm install, and it will show the error correctly)

now replace the content of package.json with this:

{
  "cpu": ["ia32"],
  "engines": {}
}

and run yarn install. this time it will correctly say that the cpu-setting is incorrect.

What is the expected behavior?

yarn should respect the cpu setting in package.json when the engines setting does not exist.

Please mention your node.js, yarn and operating system version.
node 8.15.0
windows 10
yarn 1.13.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions