Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Invalid argument during require #199

Open
vaguue opened this issue Jul 20, 2024 · 0 comments
Open

Error: Invalid argument during require #199

vaguue opened this issue Jul 20, 2024 · 0 comments

Comments

@vaguue
Copy link

vaguue commented Jul 20, 2024

Hi! When I tried to test prebuild-install locally I got this error: Error Invalid arguments. I checked the source and here is the place where this error is emitted:

if (opts.runtime === 'node' && opts.platform === process.platform && opts.abi === process.versions.modules && opts.arch === process.arch) {
  try {
    require(resolved) // ERROR HERE
  } catch (err) {
    console.log('error', err);
    return cb(err)
  }
  log.info('unpack', 'required ' + resolved + ' successfully')
}

It's very strange, because when I comment the require part everything works after that (I can use my module from the system, no errors whatsoever). Some info about my setup:

  • Backend cmake-js
  • During the prebuild phase I use node runtime, because my module is meant to be used from the Node and relies on libuv to work properly
  • Repo: https://github.com/vaguue/over-the-wire
  • My package is commonJS
  • node --version: v21.5.0

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant