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

npm error Invalid property "node" when running yarn install #753

Closed
LekkerKofi opened this issue Dec 29, 2024 · 1 comment · Fixed by #754
Closed

npm error Invalid property "node" when running yarn install #753

LekkerKofi opened this issue Dec 29, 2024 · 1 comment · Fixed by #754
Labels
bug Something isn't working

Comments

@LekkerKofi
Copy link
Contributor

Bug Report

App Version: Commit 018090a (latest commit on main)

Platform: Linux

Expected Behavior:
Running yarn installs all the dependencies without any issues.

Actual Behavior:
Yarn returns an error, saying that "node" is an invalid property.

Command output:

yarn install v1.22.22
[1/4] Resolving packages...
success Already up-to-date.
$ node -r esbuild-register .erb/scripts/check-native-dep.js && electron-builder install-app-deps && npm run build:dll
  • electron-builder  version=24.13.3
  • loaded configuration  file=package.json ("build" field)
  • installing production dependencies  platform=linux arch=x64 appDir=[REDACTED]
npm error Invalid property "node"
npm error A complete log of this run can be found in: [REDACTED]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Steps to Reproduce:

  1. Clone the repo.
  2. Run yarn.
@LekkerKofi LekkerKofi added the bug Something isn't working label Dec 29, 2024
@github-project-automation github-project-automation bot moved this to Backlog in sleek 2.x Dec 29, 2024
@LekkerKofi
Copy link
Contributor Author

Note: engines and devEngines differ in object shape. They also function very differently. engines is designed to alert the user when a dependency uses a differening npm or node version that the project it's being used in, whereas devEngines is used to alert people interacting with the source code of a project.

-- npm Docs

The issue can be resolved by making these changes to package.json:

   "devEngines": {
-    "node": ">=14.x",
-    "npm": ">=7.x"
+    "runtime": {
+      "name": "node",
+      "version": ">=14.x"
+    },
+    "packageManager": {
+      "name": "npm",
+      "version": ">=7.x"
+    }
   },

LekkerKofi added a commit to LekkerKofi/sleek that referenced this issue Dec 29, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in sleek 2.x Dec 29, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in sleek 2.x Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant