node-rs: M1 chip running error

hi there my project was copied from package templage, yarn build and yarn test works right, but when other projects require this module, give me the following (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) image

reproduce steps

  1. execute command yarn link @${module_name} in the addon module dir
  2. execute command yarn link in the caller project dir
  3. use it let {xxx} = require('@${module_name}')

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Run rustup default stable-aarch64-apple-darwin should resolve your problem.