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

Can't get it working with npm 10.9.0 #3648

Closed
4 of 5 tasks
thepasto opened this issue Oct 10, 2024 · 4 comments · Fixed by #3665
Closed
4 of 5 tasks

Can't get it working with npm 10.9.0 #3648

thepasto opened this issue Oct 10, 2024 · 4 comments · Fixed by #3665
Labels

Comments

@thepasto
Copy link

Prerequisites

  • Using npm
  • Using an up-to-date main branch
  • Using latest version of devtools. Check the docs for how to update
  • Tried solutions mentioned in #400
  • For issue in production release, add devtools output of DEBUG_PROD=true npm run build && npm start

Expected Behavior

Run the boilerplate after sources clone

Current Behavior

Can't run npm install

Steps to Reproduce

  1. git clone --depth 1 --branch main https://github.com/electron-react-boilerplate/electron-react-boilerplate.git

  2. cd electron-react-boilerplate

  3. npm install

  4. npm error Invalid property "node" npm error A complete log of this run can be found in: /home/thepasto/.npm/_logs/2024-10-10T08_58_47_469Z-debug-0.log

Possible Solution (Not obligatory)

Context

Everything is working as well with npm 10.7.0, after npm updated to 10.9.0 , every npm command fails with the message:

npm error Invalid property "node"
npm error A complete log of this run can be found in: /home/thepasto/.npm/_logs/2024-10-10T08_58_47_469Z-debug-0.log

Your Environment

  • Node version : 22.9.0 with npm 10.9.0
  • electron-react-boilerplate version or branch : main branch
  • Operating System and version : archlinux
  • Link to your project :
@thepasto thepasto added the bug label Oct 10, 2024
@aza547
Copy link

aza547 commented Oct 10, 2024

Hitting this also. Log attached.

0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using npm@10.9.0
2 info using node@v20.10.0
3 silly config load:file:C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\npmrc
4 silly config load:file:D:\checkouts\warcraft-recorder\.npmrc
5 silly config load:file:C:\Users\Alex\.npmrc
6 silly config load:file:C:\Users\Alex\AppData\Roaming\npm\etc\npmrc
7 verbose title npm run package
8 verbose argv "run" "package"
9 verbose logfile logs-max:10 dir:C:\Users\Alex\AppData\Local\npm-cache\_logs\2024-10-10T20_22_15_590Z-
10 verbose logfile C:\Users\Alex\AppData\Local\npm-cache\_logs\2024-10-10T20_22_15_590Z-debug-0.log
11 silly logfile start cleaning logs, removing 2 files
12 verbose stack Error: Invalid property "node"
12 verbose stack     at checkDevEngines (C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\node_modules\npm-install-checks\lib\dev-engines.js:100:13)
12 verbose stack     at RunScript.checkDevEngines (C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\lib\base-cmd.js:153:22)
12 verbose stack     at async #exec (C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\lib\npm.js:251:7)
12 verbose stack     at async Npm.exec (C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\lib\npm.js:207:9)
12 verbose stack     at async module.exports (C:\Users\Alex\AppData\Roaming\npm\node_modules\npm\lib\cli\entry.js:74:5)
13 error Invalid property "node"
14 verbose cwd D:\checkouts\warcraft-recorder
15 verbose os Windows_NT 10.0.22631
16 verbose node v20.10.0
17 verbose npm  v10.9.0
18 verbose exit 1
19 verbose code 1
20 error A complete log of this run can be found in: C:\Users\Alex\AppData\Local\npm-cache\_logs\2024-10-10T20_22_15_590Z-debug-0.log

Also had success with downgrading npm as a workaround.

npm install -g npm@10.7.0

@Skm344
Copy link

Skm344 commented Oct 12, 2024

I had the same issue, I ended up renaming devEngines to engines in the package.json file

@Jnoon36
Copy link

Jnoon36 commented Nov 8, 2024

I had the same issue, I ended up renaming devEngines to engines in the package.json file

Also had the same issue. On node version 22.5.1

@yldrmali
Copy link

#3656 seems the same. There's change about how devEngines property is implemented.
This is the definition for devEngines from npm docs.

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.

And with npm 10.9.0, they are checking devEngines with a new spec as defined here. feat:devEngines

You can modify the devEngines property like this.

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

alichtman added a commit to alichtman/electron-react-boilerplate that referenced this issue Dec 4, 2024
Fix electron-react-boilerplate#3648

I implemented this comment:
electron-react-boilerplate#3648 (comment)
and now `npm install` runs without error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants