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

Invalid warning when pnpm is used as an engine field #7560

Closed
clydin opened this issue Sep 19, 2019 · 7 comments
Closed

Invalid warning when pnpm is used as an engine field #7560

clydin opened this issue Sep 19, 2019 · 7 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@clydin
Copy link

clydin commented Sep 19, 2019

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

What is the current behavior?
Adding a package which has pnpm listed as an engine in its package.json results in a warning: The engine "pnpm" appears to be invalid.

If the current behavior is a bug, please provide the steps to reproduce.
Add a package which lists pnpm as an engine in its package.json.

What is the expected behavior?
No warning should be shown.

The pnpm value should be ignored as is npm here: https://github.com/yarnpkg/yarn/blob/master/src/package-compatibility.js#L50

Please mention your node.js, yarn and operating system version.
Node.js: 10.10.0
yarn: 1.17.3
OS: macOS 10.14.6

@9034725985
Copy link

9034725985 commented Sep 21, 2019

On Ubuntu as well

$ time yarn global add @angular/cli@9.0.0-next.5
yarn global v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning @angular/cli@9.0.0-next.5: The engine "pnpm" appears to be invalid.
warning @angular-devkit/architect@0.900.0-next.5: The engine "pnpm" appears to be invalid.
warning @angular-devkit/core@9.0.0-next.5: The engine "pnpm" appears to be invalid.
warning @angular-devkit/schematics@9.0.0-next.5: The engine "pnpm" appears to be invalid.
warning @schematics/angular@9.0.0-next.5: The engine "pnpm" appears to be invalid.
warning @schematics/update@0.900.0-next.5: The engine "pnpm" appears to be invalid.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@angular/cli@9.0.0-next.5" with binaries:
      - ng
Done in 1.94s.

real    0m2.191s
user    0m2.641s
sys     0m0.681s
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic
$ yarn --version
1.17.3

@paul-soporan
Copy link
Member

Closing as fixed in v2 where we don't warn on invalid engines anymore.

https://yarnpkg.com/getting-started/migration

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 3, 2021
@strarsis
Copy link

strarsis commented Mar 14, 2022

@paul-soporan: Is yarn v2 release scheduled for the near future?
I get this warning and the latest available stable yarn is v1.22.17.

@merceyz
Copy link
Member

merceyz commented Mar 18, 2022

Is yarn v2 release scheduled for the near future?

It was released a few years ago, 2020-01-24

@strarsis
Copy link

@merceyz: But why do I have yarn 1.x installed when I simply install it via npm? Or is yarn v2 not installable by npm? I surely miss something.

@merceyz
Copy link
Member

merceyz commented Mar 18, 2022

Read the migration guide that @paul-soporan linked to in #7560 (comment)

@Vkrmdabgotra
Copy link

Vkrmdabgotra commented Aug 24, 2024

we have resolved this issue in the yarn environment by ignoring the engine warning because it will not affect your working code.
firstly we created .yarnrc file in our project folder and then wrote inside this
"ignore-engines pnpm"
Please check the attachment below, I hope this solution will fix your problem.
Screenshot 2024-08-24 103458

OyvindLGjesdal added a commit to uib-ub/dspace-angular that referenced this issue Oct 10, 2024
OyvindLGjesdal added a commit to uib-ub/dspace-angular that referenced this issue Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants