Skip to content

"Error: spawn JlinkExe ENOENT" #3

Description

@josejsarmento

Working on a Raspberry Pi 4, Raspberry Pi OS lite 64, JLink V7.64e, npm 8.8.0
I have installed the NRFJprog terminal tools and JLinkExe for Linux Arm 64.

Using any of the instructions in the README, such as the following program.js:

var jlink = require("@connectedyard/node-jlink");      
jlink.reset(); // nrfjprog --reset

results in the following error:

> start
> node program.js

node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: spawn JlinkExe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn JlinkExe',
  path: 'JlinkExe',
  spawnargs: [
    '-device',
    'nrf51822',
    '-if',
    'swd',
    '-speed',
    '4000',
    '-autoconnect',
    '1'
  ]
}

Typing JLinkExe directly on the terminal opens the program, so it's correctly installed. Is this because the module is trying to call JlinkExe with a lowercase "L" instead of uppercase? I think this is done in line 43 of ./lib/jlinkexe.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions