I just created a new folder on my Desktop and loaded it to VSCode so I can start building/learning about NW.js. The first thing I've done was to open VSCode Terminal and execute npm init -y, then I've proceeded to run npm install nw@sdk. No error whatsoever.
Now my new folder has a package.json, a package-lock.json, and node_modules folder.
package.json content:
{
"name": "rename-merra-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"nw": "^0.62.1-sdk"
}
}
When I try to run npm install nw-builder --save-dev as the reference suggests @ 
The .log file can be found here: https://pastebin.com/cZAmugRF
I've tried the following:
- Restart VSCode
- Restart My Computer
- Run
npm install(Up to date, 120 packages, version 8.5.5) - Run
npmoutside VSCode, directly on the prompt (same error) - Delete package-lock.json
- Reinstall NodeJS (17.8.0)
- Install an older version of NodeJS (17.7.1)
- Search for node.js running in the background (there is none)
- Disable Windows Security
- Run
npm cache clear --force
Does anyone have any idea how to solve this error?
Maybe one of the git links (https://registry.npmjs.org/nw-builder) from the nw-builder package is down/offline? In that case, is there any way around it so I can start building with nw.js?
Thank you for your help!
CodePudding user response:
Make sure you have Git installed:
You'll likely want to change your code to:
"devDependencies": {
"nw": "0.62.1-sdk"
}
The ^ can download the normal version if it was published after the sdk version.
I haven't used nw-builder, but from my understanding, it hasn't received any updates in several years. There is a GitHub issue related to this:
Finally, here are instructions for how to manually create your own build:
More tutorials are at:
