#Segmentation fault when using johnny-five with deno

4 messages · Page 1 of 1 (latest)

rich walrus
#

I want to using johnny-five with deno, here is my code:

// @deno-types="npm:@types/johnny-five"
import { Board, Led } from "johnny-five";

const board = new Board();

board.on("ready", () => {
  const led = new Led(13);

  led.blink(1000);
});

But when I try to run it, I got this

zsh: segmentation fault  deno run -A main.ts

Any idea how to solve it?
(Note: node-gyp has been installed with Deno globally, also added --allow-script params, no error occurred when installing)

rich walrus
#

And for now, below is error message printed if I deleted node_module directory and run command deno install --allow-scripts

error: script 'install' in '@serialport/[email protected]' failed with exit code 1
stderr:
prebuild-install WARN install No prebuilt binaries found (target=22.14.0 runtime=node arch=arm64 libc= platform=darwin)
error: Failed resolving binary export. '/Users/kay/Desktop/johnnytest/node_modules/.deno/[email protected]/node_modules/node-gyp/package.json' did not exist

error: failed to run scripts for packages: @serialport/[email protected]
rich walrus
#

But for node.js there is no node-gyp error like that when installing