npm-installer icon indicating copy to clipboard operation
npm-installer copied to clipboard

npm install nw@sdk results in ENOENT error when trying to start script

Open theahura opened this issue 1 year ago • 1 comments

I'm trying to get a very basic hello world app running from an sdk build through the npm installer, but I can't seem to get it working.

Steps I took:

  • I ran the install script, npm install --save-dev nw@sdk
  • set my package.json as follows:
{
  "name": "builder",
  "version": "1.0.0",
  "description": "",
  "main": "index.html",
  "scripts": {
    "start": "nw ."
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "nw": "^0.87.0-2-sdk"
  }
}
  • ran npm start

this gave me the following error

> [email protected] start
> nw .

Error: spawn /home/soot/code/soot/playground-gen/builder/node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/soot/code/soot/playground-gen/builder/node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw',
  path: '/home/soot/code/soot/playground-gen/builder/node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw',
  spawnargs: [ '.' ]
}
node:internal/modules/run_main:129
    triggerUncaughtException(
    ^

Error: spawn /home/soot/code/soot/playground-gen/builder/node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/soot/code/soot/playground-gen/builder/node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw',
  path: '/home/soot/code/soot/playground-gen/builder/node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw',
  spawnargs: [ '.' ]
}

Node.js v20.13.1

Digging into the folder path in node_modules, I don't see a file at node_modules/nw/nwjs-v0.87.0-2-linux-x64/nw. Instead, I see a tar file called nwjs-v0.87.0-2-linux-x64.tar.gz, but that tar file has 0 bytes.

Funny enough, installing the non-sdk version of the tool seems to work fine. But I do need the debug tools unfortunately.

Running on Ubuntu 20.04, in case that helps!

theahura avatar May 10 '24 04:05 theahura

This problem is not fixed on Windows 10, at least I still have the same problem. I did the same thing (npm install --save-dev nw@sdk), but it installed the the non-sdk (nwjs-v0.88.0-win-x64).

vaykinov avatar May 24 '24 17:05 vaykinov